Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /trunk/xml/osm.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 391 - (show annotations) (download)
Tue May 18 18:33:49 2010 UTC (14 years, 10 months ago) by amb
File size: 4622 byte(s)
Small fix for OSM schema.

1 <?xml version="1.0" encoding="utf-8" ?>
2
3 <!-- ============================================================
4 $Header: /home/amb/CVS/routino/xml/osm.xsd,v 1.2 2010-05-18 18:33:49 amb Exp $
5
6 An XML Schema Definition for the OSM (JOSM?) XML format
7
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
12
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 ============================================================ -->
18
19 <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
20
21 <!-- The top level osm element -->
22
23 <xsd:element name="osm" type="osmType"/>
24
25 <xsd:complexType name="osmType">
26 <xsd:sequence>
27 <xsd:element name="bounds" type="boundsType" 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"/>
31 </xsd:sequence>
32 <xsd:attribute name="version" type="xsd:string"/>
33 <xsd:attribute name="generator" type="xsd:string"/>
34 </xsd:complexType>
35
36 <!-- The second level bounds, node, way and relation elements -->
37
38 <xsd:complexType name="boundsType">
39 <xsd:attribute name="minlat" type="xsd:string"/>
40 <xsd:attribute name="minlon" type="xsd:string"/>
41 <xsd:attribute name="maxlat" type="xsd:string"/>
42 <xsd:attribute name="maxlon" type="xsd:string"/>
43 <xsd:attribute name="origin" type="xsd:string"/>
44 </xsd:complexType>
45
46 <xsd:complexType name="nodeType">
47 <xsd:sequence>
48 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
49 </xsd:sequence>
50 <xsd:attribute name="id" type="xsd:string"/>
51 <xsd:attribute name="lat" type="xsd:string"/>
52 <xsd:attribute name="lon" type="xsd:string"/>
53 <xsd:attribute name="timestamp" type="xsd:string"/>
54 <xsd:attribute name="uid" type="xsd:string"/>
55 <xsd:attribute name="user" type="xsd:string"/>
56 <xsd:attribute name="visible" type="xsd:string"/>
57 <xsd:attribute name="version" type="xsd:string"/>
58 <xsd:attribute name="action" type="xsd:string"/>
59 </xsd:complexType>
60
61 <xsd:complexType name="wayType">
62 <xsd:sequence>
63 <xsd:element name="nd" type="ndType" minOccurs="0" maxOccurs="unbounded"/>
64 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
65 </xsd:sequence>
66 <xsd:attribute name="id" type="xsd:string"/>
67 <xsd:attribute name="timestamp" type="xsd:string"/>
68 <xsd:attribute name="uid" type="xsd:string"/>
69 <xsd:attribute name="user" type="xsd:string"/>
70 <xsd:attribute name="visible" type="xsd:string"/>
71 <xsd:attribute name="version" type="xsd:string"/>
72 <xsd:attribute name="action" type="xsd:string"/>
73 </xsd:complexType>
74
75 <xsd:complexType name="relationType">
76 <xsd:sequence>
77 <xsd:element name="member" type="memberType" minOccurs="0" maxOccurs="unbounded"/>
78 <xsd:element name="tag" type="tagType" minOccurs="0" maxOccurs="unbounded"/>
79 </xsd:sequence>
80 <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"/>
87 </xsd:complexType>
88
89 <!-- The third level elements and their contents -->
90
91 <xsd:complexType name="tagType">
92 <xsd:attribute name="k" type="xsd:string"/>
93 <xsd:attribute name="v" type="xsd:string"/>
94 </xsd:complexType>
95
96 <xsd:complexType name="ndType">
97 <xsd:attribute name="ref" type="xsd:string"/>
98 </xsd:complexType>
99
100 <xsd:complexType name="memberType">
101 <xsd:attribute name="type" type="xsd:string"/>
102 <xsd:attribute name="ref" type="xsd:string"/>
103 <xsd:attribute name="role" type="xsd:string"/>
104 </xsd:complexType>
105
106 </xsd:schema>

Properties

Name Value
cvs:description An XML Schema Definition for OSM/JOSM XML format files.