Here is a very rough first attempt at mapping the examples developed in the Boulder 2011 face-to-face meeting into serialised json, xml, html5 and kml. The html5 examples also show how we have both the option of using an external link in the head with rel=alternate or embedding it within the dom using microdata (as opposed to using a namespace).
Please send all comments and feedback to the thread on the W3C POI Working Group public discussion list.
TODO:
In many places things can have alternate versions e.g.
- href/link
link rel types that seem relevant:
pois: canonical, self, alternate, related, tag, author, copyright/license, current/latest-version, describedby, payment, version-history
poi: canonical, self, alternate, related, tag, author, copyright/license, current/latest-version, describedby, enclosure/up, payment, prefetch, version-history
- crs/srsName
- point/geo
--------------------------------------------------------------------------------------------------------------
First - here's a very high level json overview of all the key patterns:
--------------------------------------------------------------------------------------------------------------
NOTES:
"" means a string representation of a thing (e.g. an href)
{ } means a complex representation of a thing (e.g. a multi-attribute structured data definition of a link)
Where you see a <- this hints at where this was shamelessly stolen from 8)
--------------------------------------------------------------------------------------------------------------
{
href:"" or { rel:"", href:"" } or links:[{ rel:"", href:"" },...], <- a href or link rel or atom:link
description:"", <- dc.description or atom:summary
rights:"", <- link rel=copyright|license dc.rights or atom:rights
language:"", <- dc.language or xml:lang
author:"", <- link rel=author or atom:author or dc.creator
or {
name:"", <- atom:name
email:"", <- atom:email
href:"" <- atom:uri
}
created:"", <- http-header.date
updated:"", <- atom:updated or http-header.last-modified
start:"",
end:"",
pois:[
{
id:"", <- atom:id or dc.identifier !! NOTE: Atom requires an IRI not just a relative id
href:"" or { rel:"", href:"" } or links:[{ rel:"", href:"" },...], <- a href or link rel or atom:link
label:"", <- kml name, dc.title or atom:title
description:"", <- dc.description or atom:summary
rights:"", <- link rel=copyright|license dc.rights or atom:rights
language:"", <- dc.language or xml:lang
author <- link rel=author or atom:author or dc.creator
or {
name:"", <- atom:name
email:"", <- atom:email
href:"" <- atom:uri
}
created:"", <- http-header.date
updated:"", <- atom:updated or http-header.last-modified
location:{ <- georss/geojson + geo:
href:"" or { rel:"", href:"" } or links:[{ rel:"", href:"" },...], <- a href or link rel or atom:link
point:{ <- kml/georss/geojson
href:"" or { rel:"", href:"" } or links:[{ rel:"", href:"" },...], <- a href or link rel or atom:link
crs:"", <- geo uri crs, geojson.crs, GML srsName or georss.srsName
lat:"", lon:"", alt:"" or coordinates:[],
} or "geo:37.786971,-122.399677;u=35;crs=wgs84",
polygon:{ <- kml/georss/geojson
href:"" or { rel:"", href:"" } or links:[{ rel:"", href:"" },...], <- a href or link rel or atom:link
...
}
}
},
...
]
}
And below is one simple example expressed as json, xml, html5 linked, html5 embedded and kml.
--------------------------------------------------------------------------------------------------------------
simple json example:
--------------------------------------------------------------------------------------------------------------
GET http://mob-labs.com/poiwg/example02/pois.json
pois:{
href:"http://mob-labs.com/poiwg/example02/pois.json",
description:"An example collection of pois",
rights:"http://mob-labs.com/poiwg/example02/pois/rights",
language:"en-US",
author:"http://mob-labs.com/poiwg/example02/robman",
created:"2011-09-22T19:20:30.45+10:00",
updated:"2011-09-22T19:20:30.45+10:00",
poi:{
"http://mob-labs.com/poiwg/example02/pois/123":{
href:"http://mob-labs.com/poiwg/example02/pois/123",
label:"One single poi",
description:"This is an individual poi",
language:"en-US",
location:{
href:"http://mob-labs.com/poiwg/example02/pois/123/location",
point:"geo:48.198634,16.371648;crs=wgs84;u=40",
}
}
}
}
--------------------------------------------------------------------------------------------------------------
simple xml example:
--------------------------------------------------------------------------------------------------------------
GET http://mob-labs.com/poiwg/example02/pois.xml
<?xml version="1.0" encoding="UTF-8"?>
<pois href="http://mob-labs.com/poiwg/example02/pois.xml" xml:lang="en" created="2011-09-22T19:20:30.45+10:00" updated="2011-09-22T19:20:30.45+10:00">
<description>An example collection of pois</description>
<rights href="http://mob-labs.com/poiwg/example02/pois/rights" />
<author href="http://mob-labs.com/poiwg/example02/robman" />
<poi id="http://mob-labs.com/poiwg/example02/pois/123" href="http://mob-labs.com/poiwg/example02/pois/123" xml:lang="en">
<label>One single poi</label>
<description>This is an individual poi</description>
<location href="http://mob-labs.com/poiwg/example02/pois/123/location">
<point srsName="http://www.opengis.net/def/crs/EPSG/0/4326">48.198634,16.371648</point>
</location>
</poi>
</pois>
--------------------------------------------------------------------------------------------------------------
simple html5 example linked from head:
--------------------------------------------------------------------------------------------------------------
GET http://mob-labs.com/poiwg/example02/pois-linked.html
<!DOCTYPE html>
<html>
<head>
<link rel="alternate" type="application/poi+xml" hreflang="en" href="http://mob-labs.com/poiwg/example02/pois">
<script type="application/javascript" src="http://mob-labs.com/poiwg/example02/poi-2-html5-bridge.js"></script>
</head>
<body>
</body>
</html>
--------------------------------------------------------------------------------------------------------------
simple html5 example embedded using microdata:
--------------------------------------------------------------------------------------------------------------
GET http://mob-labs.com/poiwg/example02/pois-embedded.html
<!DOCTYPE html>
<html>
<head>
<script type="application/javascript" src="http://mob-labs.com/poiwg/example02/poi-microdata-processor.js"></script>
</head>
<body>
<div itemscope itemprop="pois" itemtype="http://mob-labs.com/poiwg/example02/microdata-vocabulary/pois" data-poi-created="2011-09-22T19:20:30.45+10:00" data-poi-updated="2011-09-22T19:20:30.45+10:00">
<span itemprop="description">An example collection of pois</span>
<link itemprop="canonical" href="http://mob-labs.com/poiwg/example02/pois-embedded.html">
<link itemprop="rights" href="http://mob-labs.com/poiwg/example02/pois/rights">
<link itemprop="author" href="http://mob-labs.com/poiwg/example02/robman">
<ul itemscope itemtype="http://mob-labs.com/poiwg/example02/microdata-vocabulary/poi">
<li itemprop="poi" id="http://mob-labs.com/poiwg/example02/pois/123">
<span itemprop="label">One single poi</span>
<span itemprop="description">This is an individual poi</span>
<span itemscope itemprop="location" id="http://mob-labs.com/poiwg/examples02/microdata-vocabulary/location">
<link itemprop="canonical" href="http://mob-labs.com/poiwg/example02/pois/123/location">
<link itemprop="point" href="geo:48.198634,16.371648;crs=wgs84;u=40">
</span>
</li>
</ul>
</div>
</body>
</html>
--------------------------------------------------------------------------------------------------------------
simple kml example:
--------------------------------------------------------------------------------------------------------------
GET http://mob-labs.com/poiwg/example02/pois.kml
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:pois="http://mob-labs.com/poiwg/example02/xmlns/pois">
<description>An example collection of pois</description>
<pois:link rel="canonical" href="http://mob-labs.com/poiwg/example02/pois">
<pois:link rel="rights" href="http://mob-labs.com/poiwg/example02/pois/rights">
<pois:link rel="author" href="http://mob-labs.com/poiwg/example02/robman">
<pois:created>2011-09-22T19:20:30.45+10:00</pois:created>
<pois:updated>2011-09-22T19:20:30.45+10:00</pois:updated>
<Placemark>
<pois:link rel="canonical" href="http://mob-labs.com/poiwg/example02/pois/123/location">
<name>One single poi</name>
<description>This is an individual poi</description>
<Point>
<coordinates>48.198634,16.371648</coordinates>
</Point>
</Placemark>
</kml>
--------------------------------------------------------------------------------------------------------------
simple RDF/RDFa example:
--------------------------------------------------------------------------------------------------------------
TBD