Re: Geo location with dataset, microdata and RDFa

Karl,

On Thu, Sep 8, 2011 at 8:07 AM, Karl Dubost <karl@la-grange.net> wrote:

> Hi,
> I was trying to come up with a way to represent location with different
> markup solutions.
>
> # Simple HTML
>
> <ul id="places">
>    <li>Montréal, Canada</li>
>    <li>Paris, France</li>
> </ul>
>
>
>
> # Using dataset (can be queried with dataset API)
>
> <ul data-georef="WGS84" id="places-ds">
>    <li><span
>        data-geolat="45.5"
>        data-geolon="-73.666667">Montréal</span>, Canada</li>
>    <li><span
>        data-geolat="48.856578"
>        data-geolon="2.351828">Paris</span>, France</li>
> </ul>
>
> * Issue: These data are not referring to any vocabulary agreement, they are
> really meant to be private to the page. So really not the best use of
> dataset.
>
>
>
> # Using microdata (can be queried with microdata API)
>
> <ul id="places-md"
>    itemprop="geo"
>    itemscope
>    itemtype="http://data-vocabulary.org/Geo">
>    <li>
>        <span class="city">
>        <meta itemprop="latitude" content="45.5" />
>        <meta itemprop="longitude" content="-73.666667" />
>        Montréal</span>, Canada</li>
>    <li>
>        <span class="city">
>        <meta itemprop="latitude" content="48.856578" />
>        <meta itemprop="longitude" content="2.351828" />
>        Paris</span>, France</li>
> </ul>
>
> * Issue: Doesn't define the reference system which has been used
>  http://www.data-vocabulary.org/Geo/
> * Issue: Verbose
>
>
> # Using RDFa (not implemented in browsers)
>
>
> <ul xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" id="places-rdfa">
>    <li><span
>        about="http://www.dbpedia.org/resource/Montreal"
>        geo:lat_long="45.5,-73.666667">Montréal</span>, Canada</li>
>    <li><span
>        about="http://www.dbpedia.org/resource/Paris"
>        geo:lat_long="48.856578,2.351828">Paris</span>, France</li>
> </ul>
>
> * Issue: Latitude and Longitude not separated
>  (have to parse them with regex in JS)
> * Issue: xmlns with <!doctype html>
>

With RDFa 1.1 you could use the prefix attribute:
<ul prefix="geo: http://www.w3.org/2003/01/geo/wgs84_pos#" id="places-rdfa">
    <li about="http://dbpedia.org/resource/Montreal">
        <span property="geo:lat"
...

or the vocab attribute:
<ul vocab="http://www.w3.org/2003/01/geo/wgs84_pos#" id="places-rdfa">
    <li about="http://dbpedia.org/resource/Montreal">
        <span property="lat"
...

Steph.


>
> # Question
>
> On RDFa vocabulary, I would really like a solution with geo:lat and
> geo:long, Ideas?
>
> --
> Karl Dubost
> Montréal, QC, Canada
> http://www.la-grange.net/karl/
>
>
>
> --
> Karl Dubost
> Montréal, QC, Canada
> http://www.la-grange.net/karl/
>
>
>

Received on Thursday, 8 September 2011 17:56:45 UTC