-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxqdoc-1.0.10292010.xsd
executable file
·259 lines (239 loc) · 10 KB
/
xqdoc-1.0.10292010.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0"?>
<!--
* Copyright (c)2010 Elsevier, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* The use of the Apache License does not indicate that this project is
* affiliated with the Apache Software Foundation.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.xqdoc.org/1.0"
xmlns="http://www.xqdoc.org/1.0"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!-- Simple type for defining the uris associated
with things such as library modules associated
with functions, variables, imports, etc. -->
<xsd:simpleType name="uri">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- Simple type for defining the type associated
with things such as global variables, function
parameters, and function return types etc. -->
<xsd:complexType name="type">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="occurrence" type="occurrence" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- Complex type for function parameters -->
<xsd:complexType name="parameters">
<xsd:sequence>
<xsd:element name="parameter" type="parameter" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type for an individual function parameter -->
<xsd:complexType name="parameter">
<xsd:sequence>
<xsd:element name="name" type="name" minOccurs="0"/>
<xsd:element name="type" type="type" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type for the return value from a function -->
<xsd:complexType name="return">
<xsd:sequence>
<xsd:element name="type" type="type" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!-- Simple type used for definging the number of occurrences for a global variable, function parameter
or function return type -->
<xsd:simpleType name="occurrence">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="?"/>
<xsd:enumeration value="*"/>
<xsd:enumeration value="+"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Simple type for defining the names associated
with things such as functions, paramters, module name, etc. -->
<xsd:simpleType name="name">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- Complex type used for defining the functions
invoked from within a particular function. -->
<xsd:complexType name="invoked">
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="name" type="name"/>
</xsd:sequence>
<xsd:attribute name="arity" type="xsd:integer" use="optional"/>
</xsd:complexType>
<!-- Complex type used for defining a custom comment type.
The type attribute allows the differentiation of the custom
comment types. If the custom comment is @example, then the
value in the 'tag' attribute would be 'example'. -->
<xsd:complexType name="custom">
<xsd:complexContent>
<xsd:extension base="mixed-text">
<xsd:attribute name="tag" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- Complex type used for defining the comments associated
with a library module, imports, variables, or functions.
The follow xqdoc 'directives' map to the equivalent
elements defined below ... with the exception of description
where there is no directive.
@author ...... author
@version ..... version
@param ....... param
@return ...... return
@error ....... error
@deprecated .. deprecated
@since ....... since
@see ......... see -->
<xsd:complexType name="comment">
<xsd:sequence>
<xsd:element name="description" type="mixed-text" minOccurs="0"/>
<xsd:element name="author" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="version" type="mixed-text" minOccurs="0"/>
<xsd:element name="param" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="return" type="mixed-text" minOccurs="0"/>
<xsd:element name="error" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="deprecated" type="mixed-text" minOccurs="0"/>
<xsd:element name="see" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="since" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="custom" type="custom" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for comment text to allow the inclusion
of embedded HTML markup within comments. -->
<xsd:complexType name="mixed-text" mixed="true">
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining information about the package
version (and date) used to generate the internal xqdoc XML.
Date should be the date when the XML xqdoc file is genearted.
Version should either be the version of the XQDoc conversion package
used to generate the XML or 'n/a' if the XML is generated from
some other mechanism (i.e. scripts from XHTML for MarkLogic). -->
<xsd:complexType name="control">
<xsd:sequence>
<xsd:element name="date" type="xsd:string"/>
<xsd:element name="version">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1.0"/>
<xsd:enumeration value="N/A"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the module URI and any
high-level comments associated with the module. -->
<xsd:complexType name="module">
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="name" type="name" minOccurs="0"/>
<xsd:element name="comment" type="comment" minOccurs="0"/>
<xsd:element name="body" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="main"/>
<xsd:enumeration value="library"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<!-- Complex type used for defining the variable names defined within
the library module and any comments associated with the variables. -->
<xsd:complexType name="variables">
<xsd:sequence>
<xsd:element name="variable" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="type" type="type" minOccurs="0"/>
<xsd:element name="comment" type="comment" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the imported modules within the
the library module and any comments associated with the imports. -->
<xsd:complexType name="imports">
<xsd:sequence>
<xsd:element name="import" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="comment" type="comment" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="type" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="library"/>
<xsd:enumeration value="schema"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the functions contained within the
the library module and any comments associated with the functions.
Any 'invoked' functions associated with this function should also
be defined. -->
<xsd:complexType name="functions">
<xsd:sequence>
<xsd:element name="function" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="comment" type="comment" minOccurs="0"/>
<xsd:element name="name" type="name"/>
<xsd:element name="signature" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="parameters" type="parameters" minOccurs="0" maxOccurs="1"/>
<xsd:element name="return" type="parameter" minOccurs="0" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="invoked" type="invoked" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="ref-variable" type="invoked" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element name="body" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="arity" type="xsd:integer" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the global root element of xqdoc.
There should be '1' xqdoc xml file for each library module. -->
<xsd:element name="xqdoc">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="control" type="control"/>
<xsd:element name="module" type="module"/>
<xsd:element name="imports" type="imports" minOccurs="0"/>
<xsd:element name="variables" type="variables" minOccurs="0"/>
<xsd:element name="functions" type="functions" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>