[OSM-dev] OSM XML Schema

michael_j at email.de michael_j at email.de
Mon Jul 23 18:56:21 BST 2007


Hi Frederik, 

> 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.

thanks. I somehow expected it, but I wasn't sure. 

Thus the attribute type "ID" can not be used for segments and nodes.  As I understand it might be used for ways, though it sounds not to be a wise solution either. 

Lets stick for all IDs with the attribute type "CDATA":

<!ATTLIST node id CDATA #REQUIRED>
<!ATTLIST seg id CDATA #REQUIRED>
<!ATTLIST way id CDATA #REQUIRED>

or go for the attribute type "NMTOKEN"...

<!ATTLIST node id NMTOKEN #REQUIRED>
<!ATTLIST seg id NMTOKEN #REQUIRED>
<!ATTLIST way id NMTOKEN #REQUIRED>

Michael




More information about the dev mailing list