W3C home > Mailing lists > Public > public-geolocation@w3.org > June 2008

Re: DOM based API

From: Mark Baker <distobj@acm.org>
Date: Sat, 28 Jun 2008 01:29:09 -0400
Message-ID: <e9dffd640806272229p1b8dd07ehf61e61e2cc411827@mail.gmail.com>
To: "Ian Hickson" <ian@hixie.ch>
Cc: public-geolocation@w3.org

On Mon, Jun 9, 2008 at 4:44 PM, Ian Hickson <ian@hixie.ch> wrote:
> There certainly is a group of people on this mailing list who want an API
> and not a markup language. It may be that to optimally address the use
> cases and requirements of that group of people as well as the group of
> people who want a markup language, we will need two specs. I believe
> Andrei is volunteering to edit the spec that defines the API. If anyone
> wants to volunteer to write a spec to define a markup language, I think
> that would be great. A good place to put it would be:
>   http://dev.w3.org/geo/ml/
> Alternatively, we could reuse the geo Microformat as the markup language.

Good idea.  It's a start.

Unfortunately the microformat has too many forms to make unconstrained
access practical (without a geo-parsing library), but here's how it
could look, just to give everybody a concrete example so you can
understand what I'm talking about.

  <head />
    <div id="present" class="geo">
      <span class="latitude" >xx.xx</span>
      <span class="longitude">yy.yy</span>

Then you'd have;

   lat = Location.getElementById("present").getElementsByClassName("geo")[0].getElementsByClassName("latitude").innerHTML;

Which is obviously a bit of a mouthful, but with access to a CSS or
XPath selectors library, that would of course become a whole lot
simpler, e.g.


The general idea here - as with microformats themselves - is to reuse
as much existing deployed agreement as possible.  I think the DOM +
HTML semantics is a very useful and expressive starting point, but
would also be agreeable to using DOM + a custom markup language if it
were deemed necessary.


Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
Coactus; Web-inspired integration strategies http://www.coactus.com
Received on Saturday, 28 June 2008 05:29:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:33:49 UTC