source: josm/trunk/resources/data/gpx-drawing-extensions-1.0.xsd@ 19159

Last change on this file since 19159 was 15496, checked in by Don-vip, 5 years ago

fix #16796 - Rework of GPX track colors / layer preferences (patch by Bjoeni)

File size: 5.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<schema targetNamespace="https://josm.openstreetmap.de/gpx-drawing-extensions-1.0"
3 elementFormDefault="qualified"
4 xmlns="http://www.w3.org/2001/XMLSchema"
5 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
6 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7 xmlns:gpxd="https://josm.openstreetmap.de/gpx-drawing-extensions-1.0"
8 xsi:schemaLocation="https://josm.openstreetmap.de/gpx-drawing-extensions-1.0 https://josm.openstreetmap.de/gpx-drawing-extensions-1.0.xsd">
9
10 <xsd:annotation>
11 <xsd:documentation>
12 This schema defines drawing extensions for the GPX 1.1 schema (http://www.topografix.com/GPX/1/1/gpx.xsd).
13 Elements in this schema should be used as child elements of the "extensions" element defined by the GPX schema.
14 </xsd:documentation>
15 </xsd:annotation>
16
17 <!-- Elements -->
18
19 <xsd:element name="color" type="gpxd:hexColor_type">
20 <xsd:annotation>
21 <xsd:documentation>
22 The color of the element, i.e. #RRGGBB or #RRGGBBAA.
23 Note that applications should apply possible alpha values to the lines and opacity to the whole track. This means that overlapping parts of the
24 track with alpha values will look more intense than individual lines, whereas the opacity affects the whole track including overlapping parts.
25 </xsd:documentation>
26 </xsd:annotation>
27 </xsd:element>
28
29 <xsd:element name="opacity" type="gpxd:opacity_type">
30 <xsd:annotation>
31 <xsd:documentation>
32 The opacity of the element between 0.00 and 1.00.
33 </xsd:documentation>
34 </xsd:annotation>
35 </xsd:element>
36
37 <xsd:element name="width" type="xsd:positiveInteger">
38 <xsd:annotation>
39 <xsd:documentation>
40 The width of the line in pixels, applications may use a width relative to this value if required.
41 </xsd:documentation>
42 </xsd:annotation>
43 </xsd:element>
44
45 <xsd:element name="dashPattern" type="gpxd:dashPattern_type">
46 <xsd:annotation>
47 <xsd:documentation>
48 The dash pattern of the line, see gpxd:dashPattern_type. Should always be relative to the width.
49 </xsd:documentation>
50 </xsd:annotation>
51 </xsd:element>
52
53 <!-- Types -->
54
55 <xsd:simpleType name="hexColor_type">
56 <xsd:annotation>
57 <xsd:documentation>
58 The hexColor_type must be a # followed by a 6 or 8-digit hex representation of the color (with or without the alpha value).
59 </xsd:documentation>
60 </xsd:annotation>
61 <xsd:restriction base="xsd:string">
62 <xsd:pattern value="\#([a-fA-F0-9]{6}|[a-fA-F0-9]{8})" />
63 <xsd:whiteSpace value="collapse" />
64 </xsd:restriction>
65 </xsd:simpleType>
66
67 <xsd:simpleType name="opacity_type">
68 <xsd:annotation>
69 <xsd:documentation>
70 The opacity_type must be a decimal value between 0 and 1.
71 </xsd:documentation>
72 </xsd:annotation>
73 <xsd:restriction base="xsd:decimal">
74 <xsd:minInclusive value="0" />
75 <xsd:maxInclusive value="1" />
76 </xsd:restriction>
77 </xsd:simpleType>
78
79 <xsd:simpleType name="dashPattern_type">
80 <xsd:annotation>
81 <xsd:documentation>
82 The dashPattern_type can be
83 - a representation of the pattern as y-n-y-n-... with y being the relative length of the line that is
84 visible and n being the relative length of the line that is hidden to create a dashed / dotted line.
85 Has to have an even number of segments (at least two) and can contain multi-digit numbers.
86 - one of the following predefined values:
87 none, dash-long, dash-medium, dash-short, dot-sparse, dot-normal, dot-dense, dash-dot, dash-dot-dot
88 </xsd:documentation>
89 </xsd:annotation>
90 <xsd:restriction base="xsd:string"> <!-- use string based pattern instead of enum because both pattern and enums are allowed -->
91 <xsd:pattern value="\d+\-\d+(\-\d+\-\d+)*" /> <!-- pattern, see documentation above -->
92 <xsd:pattern value="none" /> <!-- 1-0, default value/line -->
93 <xsd:pattern value="dash-long" /> <!-- 6-2 -->
94 <xsd:pattern value="dash-medium" /> <!-- 4-4 -->
95 <xsd:pattern value="dash-short" /> <!-- 2-6 -->
96 <xsd:pattern value="dot-sparse" /> <!-- 1-4 -->
97 <xsd:pattern value="dot-normal" /> <!-- 1-2 -->
98 <xsd:pattern value="dot-dense" /> <!-- 1-1 -->
99 <xsd:pattern value="dash-dot" /> <!-- 4-2-1-2 -->
100 <xsd:pattern value="dash-dot-dot" /> <!-- 4-2-1-2-1-2 -->
101 </xsd:restriction>
102 </xsd:simpleType>
103</schema>
Note: See TracBrowser for help on using the repository browser.