1 <?xml version="1.0"?>
2 <!--
3 Copyright 2018 Olaf Wintermann. All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 1. Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10
11 2. Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
14
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE.
26 -->
27
28 <xs:schema version="1.0"
29 targetNamespace="http://davutils.org/cfg/dav-sync"
30 xmlns:xs="http://www.w3.org/2001/XMLSchema"
31 xmlns:t="http://davutils.org/cfg/dav-sync"
32 elementFormDefault="qualified"
33 >
34
35 <xs:complexType name="filenameFilter">
36 <xs:sequence>
37 <xs:element name="include" type="xs:string"
38 minOccurs="0" maxOccurs="unbounded" />
39 <xs:element name="exclude" type="xs:string"
40 minOccurs="0" maxOccurs="unbounded" />
41 <xs:element name="tags" type="xs:string"
42 minOccurs="0" maxOccurs="unbounded" />
43 </xs:sequence>
44 </xs:complexType>
45
46 <xs:simpleType name="pushStrategyEnum" >
47 <xs:restriction base="xs:string">
48 <xs:enumeration value="metadata" />
49 <xs:enumeration value="hash" />
50 </xs:restriction>
51 </xs:simpleType>
52
53 <xs:simpleType name="metadataEnum" >
54 <xs:restriction base="xs:string">
55 <xs:enumeration value="mtime" />
56 <xs:enumeration value="mode" />
57 <xs:enumeration value="xattr" />
58 <xs:enumeration value="all" />
59 </xs:restriction>
60 </xs:simpleType>
61
62 <xs:simpleType name="tagStoreFormatEnum" >
63 <xs:restriction base="xs:string">
64 <xs:enumeration value="csv" />
65 <xs:enumeration value="text" />
66 <xs:enumeration value="xml" />
67 <xs:enumeration value="macos" />
68 </xs:restriction>
69 </xs:simpleType>
70
71 <xs:simpleType name="tagStoreEnum" >
72 <xs:restriction base="xs:string">
73 <xs:enumeration value="xattr" />
74 </xs:restriction>
75 </xs:simpleType>
76
77 <xs:simpleType name="tagOnConflictEnum" >
78 <xs:restriction base="xs:string">
79 <xs:enumeration value="no_conflict" />
80 <xs:enumeration value="keep_local" />
81 <xs:enumeration value="keep_remote" />
82 <xs:enumeration value="merge" />
83 </xs:restriction>
84 </xs:simpleType>
85
86 <xs:simpleType name="symlinkEnum" >
87 <xs:restriction base="xs:string">
88 <xs:enumeration value="ignore" />
89 <xs:enumeration value="follow" />
90 <xs:enumeration value="sync" />
91 </xs:restriction>
92 </xs:simpleType>
93
94 <xs:complexType name="tagConfig">
95 <xs:all>
96 <xs:element name="local-store">
97 <xs:complexType>
98 <xs:simpleContent>
99 <xs:extension base="t:tagStoreEnum">
100 <xs:attribute name="format" type="t:tagStoreFormatEnum" />
101 </xs:extension>
102 </xs:simpleContent>
103 </xs:complexType>
104 </xs:element>
105 <xs:element name="detect-changes" minOccurs="0" type="xs:boolean" default="false" />
106 <xs:element name="xattr-name" minOccurs="0" type="xs:string" />
107 <xs:element name="on-conflict" minOccurs="0" type="t:tagOnConflictEnum" />
108 </xs:all>
109 </xs:complexType>
110
111 <xs:simpleType name="fileSize">
112 <xs:restriction base="xs:normalizedString">
113 <xs:pattern value="[1-9][0-9]*(g|k|m|G|K|M)"/>
114 </xs:restriction>
115 </xs:simpleType>
116
117 <xs:complexType name="splitConfig">
118 <xs:all>
119 <xs:element name="split" type="t:split"
120 minOccurs="0" />
121 </xs:all>
122 </xs:complexType>
123
124 <xs:complexType name="split">
125 <xs:all>
126 <xs:element name="blocksize" type="t:fileSize" />
127 <xs:element name="filter" minOccurs="0" type="t:filenameFilter" />
128 <xs:element name="minsize" minOccurs="0" type="t:fileSize" />
129 </xs:all>
130 </xs:complexType>
131
132 <xs:simpleType name="versioningTypeEnum" >
133 <xs:restriction base="xs:string">
134 <xs:enumeration value="simple" />
135 <xs:enumeration value="deltav" />
136 </xs:restriction>
137 </xs:simpleType>
138
139 <xs:complexType name="versioning">
140 <xs:all>
141 <xs:element minOccurs="0" name="history" type="xs:string"/>
142 </xs:all>
143 <xs:attribute name="always" type="xs:boolean" default="false" />
144 <xs:attribute name="type" type="t:versioningTypeEnum" />
145 </xs:complexType>
146
147 <xs:complexType name="direntry">
148 <xs:all>
149 <xs:element name="name" type="xs:string"/>
150 <xs:element name="database" type="xs:string"/>
151 <xs:element name="path" type="xs:string"/>
152 <xs:element name="repository" type="xs:string"/>
153 <xs:element name="collection" minOccurs="0" type="xs:string"/>
154 <xs:element name="trash" minOccurs="0" type="xs:string"/>
155 <xs:element name="hashing" default="false" minOccurs="0" type="xs:boolean" />
156 <xs:element name="filter" minOccurs="0" type="t:filenameFilter" />
157 <xs:element name="max-retry" default="0"
158 minOccurs="0" type="xs:unsignedInt"/>
159 <xs:element name="backup-on-pull" default="false"
160 minOccurs="0" type="xs:boolean" />
161 <xs:element name="lock-pull" default="false"
162 minOccurs="0" type="xs:boolean" />
163 <xs:element name="lock-push" default="false"
164 minOccurs="0" type="xs:boolean" />
165 <xs:element name="lock-timeout" default="0"
166 minOccurs="0" type="xs:integer"/>
167 <xs:element name="tagconfig" minOccurs="0" type="t:tagConfig" />
168 <xs:element name="splitconfig" minOccurs="0" type="t:splitConfig" />
169 <xs:element name="versioning" minOccurs="0" type="t:versioning" />
170 <xs:element name="allow-cmd" minOccurs="0" type="xs:string"/>
171 <xs:element name="push-strategy"
172 minOccurs="0" type="t:pushStrategyEnum"/>
173 <xs:element name="metadata" minOccurs="0">
174 <xs:simpleType>
175 <xs:list itemType="t:metadataEnum"/>
176 </xs:simpleType>
177 </xs:element>
178 <xs:element name="symlink-intern"
179 minOccurs="0" type="t:symlinkEnum"/>
180 <xs:element name="symlink-extern"
181 minOccurs="0" type="t:symlinkEnum"/>
182 </xs:all>
183 </xs:complexType>
184
185 <xs:element name="configuration">
186 <xs:complexType>
187 <xs:sequence>
188 <xs:element name="directory" type="t:direntry"
189 minOccurs="0" maxOccurs="unbounded" />
190 </xs:sequence>
191 </xs:complexType>
192 </xs:element>
193 </xs:schema>
194