export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/robertl/xerces-c1_7_0-linux7.2/lib
export PATH=$PATH:/home/robertl/xerces-c1_7_0-linux7.2/bin

validate()
{
	SAX2Count -p -f -v=always $*
}

gpxval()
{
	echo "Validating $*"
	./gpsbabel $* -o gpx -F /tmp/$$.gpx
	validate /tmp/$$.gpx
	./gpsbabel $* -o gpx,gpxver=1.0 -F /tmp/$$.gpx
	validate /tmp/$$.gpx
	./gpsbabel $* -o gpx,gpxver=1.1 -F /tmp/$$.gpx
	validate /tmp/$$.gpx
}


# gpxval "-i gpx -f reference/holux.gpx" 
gpxval -i mapsend -f reference/chicago.trk

SAX2Count reference/holux.gpx

# Routes

# gpxval -i gpx -f reference/route/blah.gpx 
gpxval -i magellan -f reference/route/magellan.rte 
gpxval -i psitrex -f reference/route/psitrtes.txt 
# gpxval -i gpx -f reference/route/route.gpx 
gpxval -i mapsend -f reference/route/route.mapsend 
gpxval -i mapsource -f reference/route/route.mps 

# Tracks

gpxval -i mapsource -f reference/route/route.mps 
