File: gpx-drawing-extensions-1.0.xsd

package info (click to toggle)
josm 0.0.svn18646%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 216,968 kB
  • sloc: java: 389,442; xml: 199,920; perl: 10,155; jsp: 265; sh: 182; makefile: 114; javascript: 74; python: 29
file content (103 lines) | stat: -rw-r--r-- 5,077 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="https://josm.openstreetmap.de/gpx-drawing-extensions-1.0"
    elementFormDefault="qualified"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gpxd="https://josm.openstreetmap.de/gpx-drawing-extensions-1.0"
    xsi:schemaLocation="https://josm.openstreetmap.de/gpx-drawing-extensions-1.0 https://josm.openstreetmap.de/gpx-drawing-extensions-1.0.xsd">

    <xsd:annotation>
        <xsd:documentation>
            This schema defines drawing extensions for the GPX 1.1 schema (http://www.topografix.com/GPX/1/1/gpx.xsd).
            Elements in this schema should be used as child elements of the "extensions" element defined by the GPX schema.
        </xsd:documentation>
    </xsd:annotation>
    
    <!-- Elements -->

    <xsd:element name="color" type="gpxd:hexColor_type">
        <xsd:annotation>
            <xsd:documentation>
                The color of the element, i.e. #RRGGBB or #RRGGBBAA.
                Note that applications should apply possible alpha values to the lines and opacity to the whole track. This means that overlapping parts of the
                track with alpha values will look more intense than individual lines, whereas the opacity affects the whole track including overlapping parts.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="opacity" type="gpxd:opacity_type">
        <xsd:annotation>
            <xsd:documentation>
                The opacity of the element between 0.00 and 1.00.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="width" type="xsd:positiveInteger">
        <xsd:annotation>
            <xsd:documentation>
                The width of the line in pixels, applications may use a width relative to this value if required.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="dashPattern" type="gpxd:dashPattern_type">
        <xsd:annotation>
            <xsd:documentation>
                The dash pattern of the line, see gpxd:dashPattern_type. Should always be relative to the width.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <!-- Types -->

    <xsd:simpleType name="hexColor_type">
        <xsd:annotation>
            <xsd:documentation>
                The hexColor_type must be a # followed by a 6 or 8-digit hex representation of the color (with or without the alpha value).            
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="\#([a-fA-F0-9]{6}|[a-fA-F0-9]{8})" />
            <xsd:whiteSpace value="collapse" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="opacity_type">
        <xsd:annotation>
            <xsd:documentation>
                The opacity_type must be a decimal value between 0 and 1.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:decimal">
            <xsd:minInclusive value="0" />
            <xsd:maxInclusive value="1" />
        </xsd:restriction>
    </xsd:simpleType>
    
    <xsd:simpleType name="dashPattern_type">
        <xsd:annotation>
            <xsd:documentation>
                The dashPattern_type can be 
                    - a representation of the pattern as y-n-y-n-... with y being the relative length of the line that is
                      visible and n being the relative length of the line that is hidden to create a dashed / dotted line.
                      Has to have an even number of segments (at least two) and can contain multi-digit numbers.
                    - one of the following predefined values:
                      none, dash-long, dash-medium, dash-short, dot-sparse, dot-normal, dot-dense, dash-dot, dash-dot-dot
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">               <!-- use string based pattern instead of enum because both pattern and enums are allowed -->
            <xsd:pattern value="\d+\-\d+(\-\d+\-\d+)*" /> <!-- pattern, see documentation above -->
            <xsd:pattern value="none" />                  <!-- 1-0, default value/line -->
            <xsd:pattern value="dash-long" />             <!-- 6-2 -->
            <xsd:pattern value="dash-medium" />           <!-- 4-4 -->
            <xsd:pattern value="dash-short" />            <!-- 2-6 -->
            <xsd:pattern value="dot-sparse" />            <!-- 1-4 -->
            <xsd:pattern value="dot-normal" />            <!-- 1-2 -->
            <xsd:pattern value="dot-dense" />             <!-- 1-1 -->
            <xsd:pattern value="dash-dot" />              <!-- 4-2-1-2 -->
            <xsd:pattern value="dash-dot-dot" />          <!-- 4-2-1-2-1-2 -->            
        </xsd:restriction>
    </xsd:simpleType>
</schema>