-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxqdoc_comments_doc.html
executable file
·384 lines (362 loc) · 14.1 KB
/
xqdoc_comments_doc.html
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<html>
<head>
<title>xqDoc Documentation -- Comments</title>
</head>
<body bgcolor="#FFFFFF" alink="#666666" vlink="#666666">
<!-- Output the Header -->
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="index.html"><img src="logo.gif" border="0"/></a>
<br/>
<img src="line_1pixel_horizontal.gif" width="650" height="1"/>
</td>
</tr>
</table>
<p/>
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#DEDFE2" width="143" valign="top">
<br/>
<font face="Arial" size="+1"color="#4F5982">Project</font>
<br/>
<font face="Arial" color="#666666"> <a href="history.html" style="text-decoration:none">History</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="mission.html" style="text-decoration:none">Mission</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="quotes.html" style="text-decoration:none">Quotes</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="license.html" style="text-decoration:none">License</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="news.html" style="text-decoration:none">News</a></font>
<br/>
<p/>
<font face="Arial" size="+1" color="#4F5982">Related Efforts</font>
<br/>
<font face="Arial" color="#666666"> <a href="xquery-style.html" style="text-decoration:none">XQuery Style</a></font>
<br/>
<p/>
<font face="Arial" size="+1"color="#4F5982">Quick Start</font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_general.html" style="text-decoration:none">General</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_basex.html" style="text-decoration:none">BaseX</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_exist.html" style="text-decoration:none">eXist</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_marklogic.html" style="text-decoration:none">MarkLogic</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_saxon.html" style="text-decoration:none">Saxon</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_xquerydoc.html" style="text-decoration:none">xquerydoc</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="qs_zorba.html" style="text-decoration:none">Zorba</a></font>
<br/>
<p/>
<font face="Arial" size="+1"color="#4F5982">Documentation</font>
<br/>
<font face="Arial" color="#666666"> <a href="assumptions_doc.html" style="text-decoration:none">Assumptions</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="limitations_doc.html" style="text-decoration:none">Limitations</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="xqdoc_comments_doc.html" style="text-decoration:none">xqDoc Comments</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="xqdoc_schema_doc.html" style="text-decoration:none">xqDoc Schema</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="xqdoc_conversion_doc.html" style="text-decoration:none">xqDoc Conversion</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="xqdoc_display_doc.html" style="text-decoration:none">xqDoc Display</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="xqdoc_drivers_doc.html" style="text-decoration:none">xqDoc Drivers</a></font>
<br/>
<p/>
<font face="Arial" size="+1"color="#4F5982">Downloads</font>
<br/>
<font face="Arial" color="#666666"> <a href="binaries.html" style="text-decoration:none">Binaries</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="source.html" style="text-decoration:none">Source</a></font>
<br/>
<p/>
<font face="Arial" size="+1"color="#4F5982">Sample Output</font>
<br/>
<font face="Arial" color="#666666"> <a href="basic.html" style="text-decoration:none">xqDoc Basic</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="standard.html" style="text-decoration:none">xqDoc Standard</a></font>
<br/>
<font face="Arial" color="#666666"> <a href="enhanced.html" style="text-decoration:none">xqDoc Enhanced</a></font>
<br/>
<p/>
<font face="Arial" size="+1"color="#4F5982">Credits</font>
<br/>
<font face="Arial" color="#666666"> <a href="who_we_are.html" style="text-decoration:none">Who We Are</a></font>
<br/>
</td>
<!-- Spacer -->
<td width="5"/>
<!-- Vertical Line-->
<td width="2" bgcolor="#4F5982"/>
<td width="500" valign="top">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="line_1pixel_horizontal.gif" width="350" height="1"/>
</td>
<td align="middle" width="150">
<font face="Arial" color="#4F5982" size="+1"><i>xqDoc Comments</i></font>
</td>
</tr>
</table>
<p/>
<table width="500" border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<font face="Arial" color="#666666">
xqDoc comments are used to document XQuery library and main modules in a manner similar to how Javadoc comments
are used to document Java classes and packages. With the documentation close to the source, it increases
the chances that the documentation will be kept current and with tools provided by xqDoc, useful documentation
can be quickly and easily generated. It should be noted that a XQuery module does not need to contain
xqDoc style comments in order for the xqDoc tools to produce useful output. Without any xqDoc documentation style comments,
a very useful cross reference (for modules, functions, and variables) and XQuery code browser (for modules and functions) will be created by the xqDoc
tools.
<p/>
xqDoc style comments begin with a '(:~' and end with a ':)' . Of course, '(::' would have been preferable
to indicate the beginning of an xqDoc style comment (since it mimics the JavaDoc style of '/**' ) but
we didn't want to cause confusion with an XQuery pragma (since this decision was made, the definition for XQuery pragma has been changed). The choice for the begin
pattern is really quite arbitrary, and we're open to suggestions. In any case, one xqDoc style comment can be specified
before each of the following rules (based on the W3C XQuery 1.0 BNF) for library modules and main modules.
<p/>
Library Modules
<ul>
<li>ModuleDecl</li>
<li>ModuleImport</li>
<li>VarDefn</li>
<li>FunctionDefn</li>
</ul>
<p/>
Main Modules
<ul>
<li>MainModule</li>
<li>ModuleImport</li>
<li>VarDefn</li>
<li>FunctionDefn</li>
</ul>
<p/>
Like Javadoc, the following tags have special meaning within an xqDoc comment. In addition, the values
provided for each of the tags can contain embedded XHTML markup to enhance or emphasize the xqDoc XHTML
presentation. However, make sure the content is well formed and that entities are used (i.e. &amp; instead of &).
The beginning text (up to the first tag) is assumed to be description text for the component being documented.
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@author
<p/>
<font face="Arial" size="-1" color="#666666">
The @author tag identifies the author for the documented component. Zero or more @author tags can be specified (one per author)
<p/>
@author Darin McBeath
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@version
<p/>
<font face="Arial" size="-1" color="#666666">
The @version tag identifies the version of the documented component. Zero or more @version tags can be specified (one per version)
but in reality only a single @version tag would normally make sense. The value for the @version tag can be an arbitrary string.
<p/>
@version 1.0
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@since
<p/>
<font face="Arial" size="-1" color="#666666">
The @since tag identifies the version when a documented component was supported. Zero or many @since tags can be specified, but
in reality only a single @since tag would normally make sense. The value for the @since tag can be an arbitrary string
but should likely match an appropriate version value.
<p/>
@since 1.0
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@see
<p/>
<font face="Arial" size="-1" color="#666666">
The @see tag provides the ability to hypertext link to an external web site, a library or main module contained in xqDoc,
a specific function (or variable) defined in a library or main module contained in xqDoc, or arbitrary text.
To link to an external site, use a complete URL such as http://www.xquery.com. To link to a library or main module
contained in xqDoc, simply provide the URI for the library or main module. To link to a specific function (or variable)
defined in an xqDoc library or main module, simply provide the URI for the library or main module followed by a ';' and
finally the function or variable name. To provide a <i>name</i> for a link, simply include a second ';' followed
by the name. To provide text, simply include the 'text'. Multiple @see tags
can be specified (one per link or string of text).
<p/>
@see http://www.xquery.com<br/>
@see xqdoc/xqdoc-display<br/>
@see xqdoc/xqdoc-display;build-link<br/>
@see xqdoc/xqdoc-display;$months<br/>
@see xqdoc/xqdoc-display;$months;month variable<br/>
@see http://www.xquery.com;;xquery<br/>
@see some text<br/>
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@param
<p/>
<font face="Arial" size="-1" color="#666666">
The @param tag identifies the parameters associated with a function. For each parameter in a function, there should be a @param tag.
The @param tag should be followed by the parameter name (as indicated in the function signature) and then the parameter description.
<p/>
@param $name The username
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@return
<p/>
<font face="Arial" size="-1" color="#666666">
The @return tag describes what is returned from a function. Zero or one @return tags can be specified.
<p/>
@return Sequence of names matching the search criteria
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@deprecated
<p/>
<font face="Arial" size="-1" color="#666666">
The @deprecated tag identifies the identifies the documented component as being deprecated. The string of text associated with
the @deprecated tag should indicate when the item was deprecated and what to use as a replacement.
<p/>
@deprecated As of 1.0 and replaced with add-user
</font>
</td>
</tr>
</table>
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<p/><br/>
@error
<p/>
<font face="Arial" size="-1" color="#666666">
The @error tag identifies the types of errors that can be generated by the function. Zero or more @error tags
can be specified. An arbitrary string of text can be provided for a value.
<p/>
@error The requested URI does not exist
</font>
</td>
</tr>
</table>
<p/>
A representative library module xqDoc comment is included below. This comment would precede the module declaration statement
for the library module.
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<font face="Arial" size="-2" color="#666666">
(:~ <br/>
: This module provides the functions that control the Web presentation<br/>
: of xqDoc. The logic contained in this module is not specific to any<br/>
: XQuery implementation and is written to the May 2003 XQuery working<br/>
: draft specification. It would be a trivial exercise to convert this<br/>
: code to either the Nov 2003 or Oct 2004 XQuery working draft.<br/>
:<br/>
: It should also be noted that these functions not only support the <br/>
: real-time presentation of the xqDoc information but are also used<br/>
: for the static offline presentation mode as well. The static offline<br/>
: presentation mode has advantages because access to a native XML<br/>
: database is not needed when viewing the xqDoc information ... it is<br/>
: only needed when generating the offline materials. <br/>
:<br/>
: @author Darin McBeath<br/>
: @version 1.0<br/>
:)<br/>
module "xqdoc/display"
</font>
</td>
</tr>
</table>
<p/>
A representative library module xqDoc function comment is included below. This comment would precede the function declaration statement
in the library module.
<p/>
<table width="400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"/>
<td width="375">
<font face="Arial" size="-2" color="#666666">
(:~ <br/>
: The controller for constructing the xqDoc HTML information for<br/>
: the specified library module. The following information for<br/>
: each library module will be generated.<br/>
: <ul><br/>
: <li> Module introductory information</li><br/>
: <li> Global variables declared in this module</li><br/>
: <li> Modules imported by this module</li><br/>
: <li> Summary information for each function defined in the module</li><br/>
: <li> Detailed information for each function defined in the module</li><br/>
: </ul><br/>
:<br/>
: @param $uri the URI for the library module<br/>
: @param $local indicates whether to build static HTML link for offline<br/>
: viewing or dynamic links for real-time viewing.<br/>
: @return XHTML.<br/>
:)<br/>
define function print-module($uri as xs:string, $local as xs:boolean) as element()*
</font>
</td>
</tr>
</table>
</font>
</td>
</tr>
</table>
</body>
</html>