1 <?xml version="1.0" encoding="utf-8" ?>
3 <!-- ============================================================
4 $Header: /home/amb/routino/xml/RCS/routino-osm.xsd,v 1.2 2010/05/23 08:24:26 amb Exp $
6 An XML Schema Definition for the part of the OSM XML format read by Routino.
8 Part of the Routino routing software.
9 ============================================================
10 This file Copyright 2010 Andrew M. Bishop
12 This program is free software: you can redistribute it and/or modify
13 it under the terms of the GNU Affero General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16 ============================================================ -->
18 <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
20 <!-- The top level osm element -->
22 <xsd:element name="osm" type="osmType"/>
24 <xsd:complexType name="osmType">
26 <xsd:element name="bounds" type="boundsType" minOccurs="0" maxOccurs="unbounded"/>
27 <xsd:element name="bound" type="boundType" minOccurs="0" maxOccurs="unbounded"/>
28 <xsd:element name="node" type="nodeType" minOccurs="0" maxOccurs="unbounded"/>
29 <xsd:element name="way" type="wayType" minOccurs="0" maxOccurs="unbounded"/>
30 <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"/>
38 <!-- The second level bounds, node, way and relation elements -->
40 <xsd:complexType name="boundsType">
42 <xsd:attribute name="minlat" type="xsd:string"/>
43 <xsd:attribute name="minlon" type="xsd:string"/>
44 <xsd:attribute name="maxlat" type="xsd:string"/>
45 <xsd:attribute name="maxlon" type="xsd:string"/>
46 <xsd:attribute name="origin" type="xsd:string"/>
50 <xsd:complexType name="boundType">
52 <xsd:attribute name="box" type="xsd:string"/>
53 <xsd:attribute name="origin" type="xsd:string"/>
57 <xsd:complexType name="nodeType">
59 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
61 <xsd:attribute name="id" type="xsd:string"/>
62 <xsd:attribute name="lat" type="xsd:string"/>
63 <xsd:attribute name="lon" type="xsd:string"/>
65 <xsd:attribute name="timestamp" type="xsd:string"/>
66 <xsd:attribute name="uid" type="xsd:string"/>
67 <xsd:attribute name="user" type="xsd:string"/>
68 <xsd:attribute name="visible" type="xsd:string"/>
69 <xsd:attribute name="version" type="xsd:string"/>
70 <xsd:attribute name="action" type="xsd:string"/>
74 <xsd:complexType name="wayType">
76 <xsd:element name="nd" type="ndType" minOccurs="0" maxOccurs="unbounded"/>
77 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
79 <xsd:attribute name="id" type="xsd:string"/>
81 <xsd:attribute name="timestamp" type="xsd:string"/>
82 <xsd:attribute name="uid" type="xsd:string"/>
83 <xsd:attribute name="user" type="xsd:string"/>
84 <xsd:attribute name="visible" type="xsd:string"/>
85 <xsd:attribute name="version" type="xsd:string"/>
86 <xsd:attribute name="action" type="xsd:string"/>
90 <xsd:complexType name="relationType">
92 <xsd:element name="member" type="memberType" minOccurs="0" maxOccurs="unbounded"/>
93 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
95 <xsd:attribute name="id" type="xsd:string"/>
97 <xsd:attribute name="timestamp" type="xsd:string"/>
98 <xsd:attribute name="uid" type="xsd:string"/>
99 <xsd:attribute name="user" type="xsd:string"/>
100 <xsd:attribute name="visible" type="xsd:string"/>
101 <xsd:attribute name="version" type="xsd:string"/>
102 <xsd:attribute name="action" type="xsd:string"/>
106 <!-- The third level elements and their contents -->
108 <xsd:complexType name="tagType">
109 <xsd:attribute name="k" type="xsd:string"/>
110 <xsd:attribute name="v" type="xsd:string"/>
113 <xsd:complexType name="ndType">
114 <xsd:attribute name="ref" type="xsd:string"/>
117 <xsd:complexType name="memberType">
118 <xsd:attribute name="type" type="xsd:string"/>
119 <xsd:attribute name="ref" type="xsd:string"/>
120 <xsd:attribute name="role" type="xsd:string"/>