Merge branch 'upstream'
[routino] / xml / routino-tagging.xsd
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!-- ============================================================
4      $Header: /home/amb/routino/xml/RCS/routino-tagging.xsd,v 1.3 2010/09/17 17:40:55 amb Exp $
5
6      An XML Schema Definition for the Routino tagging rules XML format
7
8      Part of the Routino routing software.
9      ============================================================
10      This file Copyright 2010 Andrew M. Bishop
11
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      ============================================================ -->
17
18 <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
19
20   <!-- The top level Routino tagging rules -->
21
22   <xsd:element name="routino-tagging" type="RoutinoTaggingType"/>
23
24   <xsd:complexType name="RoutinoTaggingType">
25     <xsd:sequence>
26       <xsd:element name="node"        type="NodeType"/>
27       <xsd:element name="way"         type="WayType"/>
28       <xsd:element name="relation"    type="RelationType"/>
29     </xsd:sequence>
30   </xsd:complexType>
31
32   <!-- The second level node, way and relation tagging rules -->
33
34   <xsd:complexType name="NodeType">
35     <xsd:sequence>
36       <xsd:element name="if" type="IfType" minOccurs="0" maxOccurs="unbounded"/>
37     </xsd:sequence>
38   </xsd:complexType>
39
40   <xsd:complexType name="WayType">
41     <xsd:sequence>
42       <xsd:element name="if" type="IfType" minOccurs="0" maxOccurs="unbounded"/>
43     </xsd:sequence>
44   </xsd:complexType>
45
46   <xsd:complexType name="RelationType">
47     <xsd:sequence>
48       <xsd:element name="if" type="IfType" minOccurs="0" maxOccurs="unbounded"/>
49     </xsd:sequence>
50   </xsd:complexType>
51
52   <!-- The if tag and its contents -->
53
54   <xsd:complexType name="IfType">
55     <xsd:sequence>
56       <xsd:element name="set"      type="SetType"     minOccurs="0" maxOccurs="unbounded"/>
57       <xsd:element name="output"   type="OutputType"  minOccurs="0" maxOccurs="unbounded"/>
58     </xsd:sequence>
59     <xsd:attribute name="k" type="xsd:string"/>
60     <xsd:attribute name="v" type="xsd:string"/>
61   </xsd:complexType>
62
63   <xsd:complexType name="SetType">
64     <xsd:attribute name="k" type="xsd:string"/>
65     <xsd:attribute name="v" type="xsd:string"/>
66   </xsd:complexType>
67
68   <xsd:complexType name="OutputType">
69     <xsd:attribute name="k" type="xsd:string"/>
70     <xsd:attribute name="v" type="xsd:string"/>
71   </xsd:complexType>
72
73 </xsd:schema>