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

Robert Helgesson robert at rycee.net
Tue Mar 27 16:53:04 BST 2012


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




More information about the dev mailing list