You are not logged in.

#1 2010-04-16 01:54:26

GSzpetkowski
Member
Registered: 2010-04-15
Posts: 5

OSM 0.6 XML Schema (XSD)

Hi,

maybe you will be interested. I wrote XML Schema, which describes XML, which I can get via REST API or by "Export" on http://www.openstreetmap.org/.

http://mars.iti.pk.edu.pl/~mfi/OSMSchema.xsd

It was tested on free AltovaXML engine (http://www.altova.com/altovaxml.html) I don't think there is any sense to write DTD, XSD is much more flexible. I try to do my best, but it may be not perfect (e.g. I don't care about altitude attribute for node element).

Hope it will be usefull for anyone.
Regards,
Greg

Offline

#2 2010-04-16 07:19:25

MHohmann
Member
From: Tartu, Estonia
Registered: 2009-06-07
Posts: 1,589
Website

Re: OSM 0.6 XML Schema (XSD)

Are you sure that a relation has at least two members? I think there are some route relations (type=route, route=road) containing only one way.

Besides that, great work!


SotM Baltics, 3.-4. August 2013, Tartu, Estonia: amenity=university, mappers=yes

Offline

#3 2010-04-16 15:01:31

GSzpetkowski
Member
Registered: 2010-04-15
Posts: 5

Re: OSM 0.6 XML Schema (XSD)

Thanks, I changed from "at least two members" to "at least one member". If there are other things, please let me know, I am not OSM expert.

Offline

#4 2010-04-16 15:57:15

Pieren
Member
Registered: 2007-10-31
Posts: 312

Re: OSM 0.6 XML Schema (XSD)

In fact, relations don't have restrictions about members : zero is possible, just tags. They can be themselves members of other relations...

Last edited by Pieren (2010-04-16 16:25:05)

Offline

#5 2010-04-16 16:12:37

GSzpetkowski
Member
Registered: 2010-04-15
Posts: 5

Re: OSM 0.6 XML Schema (XSD)

Sure, mea culpa. Changed (allowing no members elements for relation elements). Members can have type="relation". Thanks !

Offline

#6 2010-05-26 12:02:24

ckessler
Member
From: Münster, Germany
Registered: 2010-05-26
Posts: 1
Website

Re: OSM 0.6 XML Schema (XSD)

Very useful stuff, thanks! I have added elements for osmChange (create, modify, delete) and changeset to the XSD. I don't have a proper XML editor at hand, though, so I did this by hand. JAXB parsed it fine, so it should be okay – still, use with caution wink

Here's the link: http://ifgi.uni-muenster.de/~kessler/re … Schema.xsd

Offline

#7 2015-02-16 22:50:28

rjlabs
Member
Registered: 2015-02-02
Posts: 4

Re: OSM 0.6 XML Schema (XSD)

This is where the official, current xsd should be located. (see links from there to what files are currently available.)
https://wiki.openstreetmap.org/wiki/OSM_XML/XSD

Offline

Board footer

Powered by FluxBB