-
Notifications
You must be signed in to change notification settings - Fork 4
/
darcs.xsd
207 lines (187 loc) · 5.96 KB
/
darcs.xsd
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="UTF-8"?>
<!--
XML Schema for darcs XML outputs for following commands
- changes / log
- changes / log with summary
- annotate directory
- annotate file
Defined within default namespace.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!--
darcs changes / log with(out) summary
Root element: changelog
-->
<xs:element name="changelog">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="patch">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"/>
<xs:element minOccurs="0" ref="comment"/>
<xs:element minOccurs="0" ref="summary"/>
</xs:sequence>
<xs:attribute name="author" use="required"/>
<xs:attribute name="date" use="required"/>
<xs:attribute name="hash" use="required"/>
<xs:attribute name="inverted" use="required" type="xs:NCName"/>
<xs:attribute name="local_date" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="summary">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="add_directory"/>
<xs:element ref="add_file"/>
<xs:element ref="modify_file"/>
<xs:element ref="move"/>
<xs:element ref="remove_directory"/>
<xs:element ref="remove_file"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="add_directory" type="xs:string"/>
<xs:element name="add_file">
<xs:complexType mixed="true">
<xs:attribute name="conflict" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element name="modify_file">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="added_lines"/>
<xs:element ref="removed_lines"/>
<xs:element ref="replaced_tokens"/>
</xs:choice>
<xs:attribute name="conflict" type="xs:boolean"/>
<xs:attribute name="duplicate" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element name="added_lines">
<xs:complexType>
<xs:attribute name="num" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="removed_lines">
<xs:complexType>
<xs:attribute name="num" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="replaced_tokens">
<xs:complexType>
<xs:attribute name="num" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="move">
<xs:complexType>
<xs:attribute name="from" use="required"/>
<xs:attribute name="to" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="remove_directory">
<xs:complexType mixed="true">
<xs:attribute name="conflict" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element name="remove_file">
<xs:complexType mixed="true">
<xs:attribute name="conflict" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<!--
darcs annotate file
Root element: file
-->
<xs:element name="file">
<xs:complexType>
<xs:sequence>
<xs:element ref="created_as"/>
<xs:element ref="modified"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="added_line"/>
<xs:element ref="normal_line"/>
<xs:element ref="removed_line"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="added_line" type="xs:string"/>
<xs:element name="normal_line">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="added_by"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="removed_line">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="added_by"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
darcs annotate directory
Root element: directory
-->
<xs:element name="directory">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="created_as"/>
<xs:element ref="directory"/>
<xs:element ref="modified"/>
</xs:choice>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="file"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="created_as">
<xs:complexType>
<xs:sequence>
<xs:element ref="patch"/>
</xs:sequence>
<xs:attribute name="original_name" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="modified">
<xs:complexType>
<xs:sequence>
<xs:element ref="modified_how"/>
<xs:element ref="patch"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="modified_how" type="xs:string"/>
<xs:element name="added_by">
<xs:complexType>
<xs:sequence>
<xs:element ref="patch"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="patch">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"/>
<xs:element minOccurs="0" ref="comment"/>
</xs:sequence>
<xs:attribute name="author" use="required"/>
<xs:attribute name="date" use="required"/>
<xs:attribute name="hash" use="required"/>
<xs:attribute name="inverted" use="required" type="xs:NCName"/>
<xs:attribute name="local_date" use="required"/>
</xs:complexType>
</xs:element>
<!--
Shared by annotate and changes
-->
<xs:element name="name" type="xs:string"/>
<xs:element name="comment" type="xs:string"/>
</xs:schema>