You are not logged in.
SimplePie support has moved to Yahoo! Groups, and bug tracking has moved to bugs.simplepie.org. This support site will remain available as a read-only archive for the foreseeable future.
I've been testing the get_latitude and get_longitude functions out today and each of the first three feeds I'd tried had at least some sort of error. They were all the fault of the site in question and not SimplePie, but perhaps SimplePie should be more forgiving.
To give some examples, feeds from FreeThePostcode and OpenStreetMap both use 'lat' and 'lon' (instead of 'long') as the elements under the W3C Geo namespace. Whilst not correct, I believe this is quite widespread due partially to the prevalence of geo:lat=x.xx and geo:lon=x.xx in tripletags. Another is that Geograph had included a trailing slash for the GeoRSS namespace where there isn't one in the spec. It had been added in accidentally because many other namespaces do have the trailing slash.
So, I'd like to ask if we can add 'lon' as an alternative to 'long', in case there are other feeds out there doing the same thing. Mikel Maron's WorldKit RSS aggregator does this for example. Secondly, I'd like to ask if there should be any flexibility in namespaces being a trailing slash off. I know technically that is then a different URI, so perhaps it's not something that should be made more flexible.
Last edited by dankarran (13 February 2007 06:03:19)
Offline
I didn't actually really look at real world usage before coding it, only looking at the spec. Undoubtedly the right way to do things, though. The namespace support is all to do with dealing with more complex XML documents containing feeds (or feeds containing other things, like Atom content having an SVG title element, which under several parsers would be treated as an XHTML title). For that reason we can't be lenient at all with namespace URLs (they are, for the purposes of xml-names strings, and cannot be normalised in anyway).
Allowing other tag names (like geo:lon instead of geo:long) can be done without issue. I'll probably go to the extreme of allowing Flickr's data in the wrong namespace (it won't actually cause any breakages, as the element names are unused in that namespace).
Offline
That's understandable with respect to being strict on the namespace URLs (I presumed it would be the case). Whenever I come across feeds that use geo:lon instead of geo:long I'll try and let the publisher know, but flexibility on the parser side in the short term would be nice.
Cheers for all the great work on SimplePie!
Offline