[http://creativecommons.org/licenses/by/3.0/]
This work is licensed under a CC
Attribution 3.0 Unported License [http://creativecommons.org/licenses/by/3.0/]
The Extensible Markup Language (XML) has been introduced in 1998 to enable content providers to publish their content on the Web in an application-specific format. HTML was considered as conveying not enough semantics, since its only purpose was (and is) the preparation of content for Web-based publishing. XML was the first step towards machine-readable data formats for the Web, a trend that since its invention has been taken to higher levels with the idea of the Semantic Web. XML appeared when the Web was in the steepest part of its success curve, and since then has taken over as the globally accepted format for the exchange of machine-readable structured data.
http://dret.net/lectures/xml-fall13/ [./]
xml-fall13@bspace.berkeley.edu [mailto:xml-fall13@bspace.berkeley.edu]
project report(graded individually)
a(all slides), and then
s(smaller font) a couple of times
http://dret.net/biblio/
[http://dret.net/biblio/]<gpx version="1.1" creator="Garmin Connect" xmlns="http://www.topografix.com/GPX/1/1"> <metadata> <link href="connect.garmin.com"> <text>Garmin Connect</text> </link> <time>2010-01-15T20:21:18.000Z</time> </metadata> <trk> <name>Fire Trail</name> <trkseg> <trkpt lon="-122.256273524836" lat="37.8699341509491"> <time>2010-01-15T20:21:18.000Z</time> </trkpt> <trkpt lon="-122.256267238408" lat="37.8699422813952"> <ele>98.4</ele> <time>2010-01-15T20:21:21.000Z</time> </trkpt> <trkpt lon="-122.256179982796" lat="37.8701049741358"> <ele>100.4</ele> <time>2010-01-15T20:21:26.000Z</time> </trkpt>
declare default element namespace "http://www.topografix.com/GPX/1/1"; declare namespace saxon="http://saxon.sf.net/"; declare option saxon:output "method=text"; declare variable $dir := '/Users/dret/Desktop/Dropbox/training/'; declare variable $file := '2010-*.gpx'; declare variable $files := collection(concat($dir,'?select=',$file)); declare variable $lon := -122.48; declare variable $lat := 37.82; declare variable $box := 0.01; declare variable $lonlower := $lon - $box; declare variable $lonupper := $lon + $box; declare variable $latlower := $lat - $box; declare variable $latupper := $lat + $box; ( "Searching", count($files), "files with", count($files/gpx/trk/trkseg/trkpt), "track points:
", for $activity in $files where exists($activity/gpx/trk/trkseg/trkpt[ (@lon > $lonlower) and (@lon < $lonupper) and (@lat > $latlower) and (@lat < $latupper) ]) return ( saxon:format-date(xs:date(substring($activity/gpx/metadata/time/text(),1,10)), "[MNn] [D], [Y]"), ": ", $activity/gpx/trk/name/text(), "
") )
tree biasof XML
documents
natural coherenceis hard to manage
declare default element namespace "http://www.topografix.com/GPX/1/1"; declare variable $files := doc("/"); declare variable $lon := -122.48; declare variable $lat := 37.82; declare variable $box := 0.01; declare variable $lonlower := $lon - $box; declare variable $lonupper := $lon + $box; declare variable $latlower := $lat - $box; declare variable $latupper := $lat + $box; ( "Searching", count($files), "files with", count($files/gpx/trk/trkseg/trkpt), "track points:
", for $activity in $files where exists($activity/gpx/trk/trkseg/trkpt[ (@lon > $lonlower) and (@lon < $lonupper) and (@lat > $latlower) and (@lat < $latupper) ]) return ( substring($activity/gpx/metadata/time/text(),1,10), ": ", $activity/gpx/trk/name/text(), "
") )
XML Big Data