GEO uri rfc5870 #2

Closed
glennjones opened this Issue Dec 30, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

glennjones commented Dec 30, 2012

If I parse a geo as u-geo for example using this html

<p class="h-adr">
<a class="p-name u-geo" href="geo:51.526421;-0.081067;crs=wgs84;u=40">Bricklayer's Arms</a>,
<span class="p-locality">London</span>
</p>

should the response start with 'geo'

geo:51.526421;-0.081067;crs=wgs84;u=40

or just be

51.526421;-0.081067;crs=wgs84;u=40

Contributor

barnabywalters commented Dec 30, 2012

The u- prefix and property name shouldn’t have any effect on the final value, just how it’s parsed out of the HTML. So I vote "whatever the author authored".

Contributor

glennjones commented Dec 30, 2012

+1

I am going to add a geo helper class to my library, separate from the parser.

Owner

tantek commented Dec 31, 2012

Per the parsing spec, the "u-geo" class name, per the u-* parsing rules, instructs the parser in this case to retrieve its value from the href attribute, and set the "geo" property to it.

Thus the value of the "geo" property in the JSON is simply the href value (with any relative URL processing applied, which in this case, there is none, since an absolute URL starting with geo: is specified)

geo:51.526421;-0.081067;crs=wgs84;u=40

@glennjones glennjones closed this Jun 2, 2015

kevinmarks added a commit that referenced this issue Jun 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment