Talk:API v0.5/XSD

From OpenStreetMap Wiki
Jump to navigation Jump to search

I have a problem to translate the (tag|member)+ from

<!ELEMENT relation ((tag|member)*)>

See: OSM_Protocol_Version_0.5/DTD

I did min 1 max unbound for both tag and member, but this is not correct.

--Dspies 16:23, 24 June 2008 (UTC)


True/False stuff, shouldn't that be xs:boolean? --Skinkie 16:26, 24 June 2008 (UTC)

Yes, you are right. --Dspies 16:34, 24 June 2008 (UTC)

I got now the solution for the ((tag|member)*). BUT you have an error in yours: You define fullosm with xs:all what means the elements can occur in any order, BUT exaclty one time, what is not correct. xs:sequence (what I used) is also not correct, because the order is implied (so, first the nodes, then the ways, then the relations)

Mmm... true. I think we should clean your version with the right xs:types. Some strings should be decimals etc. I think we can work something out for ((tag|member)*). --Skinkie 16:40, 24 June 2008 (UTC) I fixed the above notice. --Skinkie 17:19, 24 June 2008 (UTC)


I cleaned my up a little bit and inserted the type T_osm for the root element. I think I fixed the (tag|member)* and I think the (tag*,nd,tag*,nd,(tag|nd)*) thing. Quite complex, maybe you can have a look..

There is one issue: The offical DTD says:

<!ELEMENT osm (bound?,(node|relation|way)*)>

What means that there can be ONE bound element as first element. But JOSM produces more than one bound elements.. It's a bug in JOSM, BUT I think the DTD is wrong, because multiple bounds make sense!

What do you mean "Some strings should be decimals"? the version? correct. Some others? ref schould be long, because it's a 64bit unsigned int. I used signed, but I will fix this. about float for lat and lon - I don't know if it os correct..


I think one bound makes sense for a map request doesn't it? For readability would it be a good idea to have the 8 elements before the actual constraint specification? --Skinkie 11:06, 25 June 2008 (UTC)