Re: [OSM-dev] Schema for v0.6 OSM files?

2012-03-28 Thread Robert Helgesson
On 2012-03-27, Tom Hughes t...@compton.nu wrote:
 On 27/03/12 16:53, Robert Helgesson wrote:
 I'm wondering, does anybody have an up-to-date XML Schema or DTD
 for the OSM files used by the v0.6 API? The ones I found at
 http://wiki.openstreetmap.org/wiki/API_v0.6/XSD and
 http://wiki.openstreetmap.org/wiki/API_v0.6/DTD don't seem to fully
 represent the format.

 Those are both user contributed and quite likely permanently out of
 date as none of the developers will be likely to update them.

Ok, thanks for the warning and I see that somebody has added the
warning to the wiki-pages I linked. Anyway, I'll use the 'natural
language' documentation on the wiki instead.

/Robert


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Schema for v0.6 OSM files?

2012-03-28 Thread Stefan Keller
We're speaking of about three pages of XML and that is not that big thing.
Of course I could do it but who - if not the developers - would know
better than they themselves?
I think that it would be a sign of maturity of the OSM project if an
XML schema would exist!
Just my 2 cents.

-Stefan

2012/3/28 Robert Helgesson rob...@rycee.net:
 On 2012-03-27, Tom Hughes t...@compton.nu wrote:
 On 27/03/12 16:53, Robert Helgesson wrote:
 I'm wondering, does anybody have an up-to-date XML Schema or DTD
 for the OSM files used by the v0.6 API? The ones I found at
 http://wiki.openstreetmap.org/wiki/API_v0.6/XSD and
 http://wiki.openstreetmap.org/wiki/API_v0.6/DTD don't seem to fully
 represent the format.

 Those are both user contributed and quite likely permanently out of
 date as none of the developers will be likely to update them.

 Ok, thanks for the warning and I see that somebody has added the
 warning to the wiki-pages I linked. Anyway, I'll use the 'natural
 language' documentation on the wiki instead.

 /Robert


 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Schema for v0.6 OSM files?

2012-03-28 Thread Frederik Ramm

Hi,

On 03/28/12 17:08, Stefan Keller wrote:

We're speaking of about three pages of XML and that is not that big thing.
Of course I could do it but who - if not the developers - would know
better than they themselves?
I think that it would be a sign of maturity of the OSM project if an
XML schema would exist!


It is easy to write an XML schema but it would never be binding for 
anyone. The problem is that people would still assume that the schema 
was somehow the gold standard and every OSM XML file that they ever see 
would comply to that standard, and that is simply not the case.


For example, JOSM writes almost-compatible OSM XML but has an additional 
action attribute. Of course someone only looking at the API code would 
not know that there are files with such an attribute. So would it be 
included in the standard or not? And if not, it's not going to be long 
until someone pops up on the JOSM list and complains that JOSM was 
writing invalid files (because they don't comply with the standard).


There are other tools that do similar things.

I think the better way is to think of our XML as a general, weakly 
formatted exchange format, instead of something that conforms to a given 
schema. Think of our XML as if it were JSON.


Bye
Frederik

--
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09 E008°23'33

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Schema for v0.6 OSM files?

2012-03-27 Thread Robert Helgesson
I'm wondering, does anybody have an up-to-date XML Schema or DTD for
the OSM files used by the v0.6 API? The ones I found at
http://wiki.openstreetmap.org/wiki/API_v0.6/XSD and
http://wiki.openstreetmap.org/wiki/API_v0.6/DTD don't seem to fully
represent the format.

For example, using xmllint to validate a downloaded relation gives the
following result:

$ wget http://www.openstreetmap.org/api/0.6/relation/65559
$ xmllint --noout --schema osm0.6.xsd 65559
65559:3: element relation: Schemas validity error : Element
   'relation', attribute 'uid': The attribute 'uid' is not allowed.
65559 fails to validate
$ xmllint --noout --dtdvalid osm0.6.dtd 65559
65559:3: element relation: validity error : No declaration for
   attribute version of element relation
65559:3: element relation: validity error : No declaration for
   attribute uid of element relation
Document 65559 does not validate against osm0.6.dtd

Note, the DTD and XML Schema even seem to disagree with each other as
to whether relations may have a version attribute.

Regards,

Robert


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Schema for v0.6 OSM files?

2012-03-27 Thread Tom Hughes

On 27/03/12 16:53, Robert Helgesson wrote:


I'm wondering, does anybody have an up-to-date XML Schema or DTD for
the OSM files used by the v0.6 API? The ones I found at
http://wiki.openstreetmap.org/wiki/API_v0.6/XSD and
http://wiki.openstreetmap.org/wiki/API_v0.6/DTD don't seem to fully
represent the format.


Those are both user contributed and quite likely permanently out of date 
as none of the developers will be likely to update them.


Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev