1 <?xml version="1.0" encoding="utf-8" ?>
3 <!-- ============================================================
4 $Header: /home/amb/routino/xml/RCS/osm.xsd,v 1.3 2010/05/23 08:24:26 amb Exp $
6 An XML Schema Definition for the OSM (JOSM?) XML format
8 Created by reverse engineering a JOSM saved file, not used in Routino
9 but a proof-of-concept parser created by xsd-to-xmlparser.
10 ============================================================
11 This file Copyright 2010 Andrew M. Bishop
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU Affero General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17 ============================================================ -->
19 <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
21 <!-- The top level osm element -->
23 <xsd:element name="osm" type="osmType"/>
25 <xsd:complexType name="osmType">
27 <xsd:element name="bounds" type="boundsType" minOccurs="0" maxOccurs="unbounded"/>
28 <xsd:element name="bound" type="boundType" minOccurs="0" maxOccurs="unbounded"/>
29 <xsd:element name="node" type="nodeType" minOccurs="0" maxOccurs="unbounded"/>
30 <xsd:element name="way" type="wayType" minOccurs="0" maxOccurs="unbounded"/>
31 <xsd:element name="relation" type="relationType" minOccurs="0" maxOccurs="unbounded"/>
33 <xsd:attribute name="version" type="xsd:string"/>
34 <xsd:attribute name="generator" type="xsd:string"/>
37 <!-- The second level bounds, node, way and relation elements -->
39 <xsd:complexType name="boundsType">
40 <xsd:attribute name="minlat" type="xsd:string"/>
41 <xsd:attribute name="minlon" type="xsd:string"/>
42 <xsd:attribute name="maxlat" type="xsd:string"/>
43 <xsd:attribute name="maxlon" type="xsd:string"/>
44 <xsd:attribute name="origin" type="xsd:string"/>
47 <xsd:complexType name="boundType">
48 <xsd:attribute name="box" type="xsd:string"/>
49 <xsd:attribute name="origin" type="xsd:string"/>
52 <xsd:complexType name="nodeType">
54 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
56 <xsd:attribute name="id" type="xsd:string"/>
57 <xsd:attribute name="lat" type="xsd:string"/>
58 <xsd:attribute name="lon" type="xsd:string"/>
59 <xsd:attribute name="timestamp" type="xsd:string"/>
60 <xsd:attribute name="uid" type="xsd:string"/>
61 <xsd:attribute name="user" type="xsd:string"/>
62 <xsd:attribute name="visible" type="xsd:string"/>
63 <xsd:attribute name="version" type="xsd:string"/>
64 <xsd:attribute name="action" type="xsd:string"/>
67 <xsd:complexType name="wayType">
69 <xsd:element name="nd" type="ndType" minOccurs="0" maxOccurs="unbounded"/>
70 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
72 <xsd:attribute name="id" type="xsd:string"/>
73 <xsd:attribute name="timestamp" type="xsd:string"/>
74 <xsd:attribute name="uid" type="xsd:string"/>
75 <xsd:attribute name="user" type="xsd:string"/>
76 <xsd:attribute name="visible" type="xsd:string"/>
77 <xsd:attribute name="version" type="xsd:string"/>
78 <xsd:attribute name="action" type="xsd:string"/>
81 <xsd:complexType name="relationType">
83 <xsd:element name="member" type="memberType" minOccurs="0" maxOccurs="unbounded"/>
84 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
86 <xsd:attribute name="id" type="xsd:string"/>
87 <xsd:attribute name="timestamp" type="xsd:string"/>
88 <xsd:attribute name="uid" type="xsd:string"/>
89 <xsd:attribute name="user" type="xsd:string"/>
90 <xsd:attribute name="visible" type="xsd:string"/>
91 <xsd:attribute name="version" type="xsd:string"/>
92 <xsd:attribute name="action" type="xsd:string"/>
95 <!-- The third level elements and their contents -->
97 <xsd:complexType name="tagType">
98 <xsd:attribute name="k" type="xsd:string"/>
99 <xsd:attribute name="v" type="xsd:string"/>
102 <xsd:complexType name="ndType">
103 <xsd:attribute name="ref" type="xsd:string"/>
106 <xsd:complexType name="memberType">
107 <xsd:attribute name="type" type="xsd:string"/>
108 <xsd:attribute name="ref" type="xsd:string"/>
109 <xsd:attribute name="role" type="xsd:string"/>