[OSM-dev] OSM XML Schema

Frederik Ramm frederik at remote.org
Sun Jul 22 22:46:48 BST 2007


Hi,

> The OSM API uses HTTP to transport XML-Payload between the client and server. In order to specify the structure of that payload carried e.g. in the response body of the HTTP Get method, I add XML DTD Schemas. I have used DTDs instead of other XML Schemas, as these are very good readable for humans.

I fear you won't be able to represent what we are doing in a valid DTD, 
since...

> As according to the XML DTD Standard it is required that all attributes marked as 'ID' are globally unique, the elements way, seg (and node) must never have the same id. Therefore I need to know, whether the database assigns IDs globally unique or just unique to each element category.

Firstly, the ID is only unique within the class (way, segment, node). 
Furthermore, a <way> tag can have any number of elements

<seg id="1">
<seg id="15">
<seg id="37">

and these are not unique either; you can have multiple ways referring to 
the same segment, and then these may end up multiple times in the XML.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'




More information about the dev mailing list