-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqs_exist.html
executable file
·337 lines (329 loc) · 11.1 KB
/
qs_exist.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
<html>
<head>
<title>xqDoc Project -- Quick Start [eXist]</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>eXist</i></font>
</td>
</tr>
</table>
<p/>
<table width="500" border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<center>
<font face="Arial" color="#666666" size="-1">
The eXist quick start guide is courtesy of Wolfgang Meier
</font>
</center>
<p/>
<font face="Arial" color="#666666">
This quick start guide provides instructions for using xqDoc with
the eXist Open Source XML database <a href="http://exist-db.org">http://exist-db.org</a>.
Future versions of eXist will use xqDoc to document eXist's own library modules,
so xqDoc will probably be included in the main distribution of eXist.
In the meantime, the following describes how to set up eXist for xqDoc.
<p/>
You should download the most recent stable build of eXist from SourceForge.
<p/>
</font>
<font face="Arial" color="#666666" size="-1">
<p/>
<br/>
<b>Setting up the classpath</b>
<p/>
To run the xqDoc drivers, you need the following jar files in your CLASSPATH.
<p/>
From eXist:
</font>
<p/>
<ul>
<font face="Arial" color="#666666" size="-1">
<li>exist.jar</li>
<li>lib/core/xmldb.jar</li>
<li>lib/core/xmlrpc-1.2-patched.jar</li>
<li>lib/core/antlr.jar</li>
</font>
</ul>
<p/>
<font face="Arial" color="#666666">
From xqDoc:
</font>
<p/>
<ul>
<font face="Arial" color="#666666" size="-1">
<li>xqdoc_conv.jar available <a href="downloads/xqdoc-conversion-bin-v1_6.zip">here</a></li>
</font>
</ul>
<p/>
<font face="Arial" color="#666666">
Plus the eXist driver jar for xqDoc:
</font>
<p/>
<ul>
<font face="Arial" color="#666666" size="-1">
<li>xqdoc_eXist.jar available <a href="downloads/xqdoc-eXist-driver-bin-v1_0.zip">here</a></li>
</font>
</ul>
<p/>
<br/>
<font face="Arial" color="#666666">
<b>EXistFileDriver</b>
<p/>
This driver parses a set of XQuery files from the file system and stores the generated
xqDoc XML into the database collection /db/xqdoc on an eXist server. The
invocation should look as follows:
</font>
<p/>
<font face="Arial" color="#666666" size="-1">
java org.xqdoc.drivers.exist.EXistFileDriver dirOrFile [serverURI] [user] [password]
</font>
<p/>
<font face="Arial" color="#666666">
<ul>
<li>dirOrFile: is either a directory or a single XQuery file.</li>
<li>serverURI: (optional) the XML:DB URI of the root database collection. By default
this is xmldb:exist://localhost:8080/exist/xmlrpc/db, which corresponds to a default
eXist setup.</li>
<li>user: (optional) the user name to use for the connection.</li>
<li>password: (optional) the password.</li>
</ul>
<p/>
So, assuming that ...
<p/>
<ul>
<li>your XQuery files are in /home/test/xquery</li>
<li>your eXist server is running on host myserver.com</li>
</ul>
<p/>
the correct command line would be ...
<p/>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>java</td>
<td>org.xqdoc.drivers.exist.EXistFileDriver</td>
</tr>
<tr>
<td/>
<td>/home/test/xquery</td>
</tr>
<tr>
<td/>
<td>xmldb:exist://myserver.com:8080/exist/xmlrpc/db</td>
</tr>
<tr>
<td/>
<td>guest</td>
</tr>
<tr>
<td/>
<td>guest</td>
</tr>
</table>
<p/>
<br/>
<b>EXistStoredModuleDriver</b>
<p/>
Use this version of the driver if your XQuery sources are stored in a database
collection, not in the file system. The first parameter is the collection to
scan for XQuery modules. All other parameters are like above.
<p/>
So assuming that you want to parse the XQuery modules stored in the database
collection /db/modules, you would use ...
<p/>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>java</td>
<td>org.xqdoc.drivers.exist.EXistStoredModuleDriver</td>
</tr>
<tr>
<td/>
<td>/db/modules</td>
</tr>
<tr>
<td/>
<td>xmldb:exist://myserver.com:8080/exist/xmlrpc/db</td>
</tr>
<tr>
<td/>
<td>guest</td>
</tr>
<tr>
<td/>
<td>guest</td>
</tr>
</table>
<p/>
<br/>
<b>EXistZipDriver</b>
<p/>
This driver, similar to the MarkLogicZipDriver, will create an off-line viewing mode for the xqDoc XML.
This driver is currently under development and will be available soon.
<p/>
<br/>
<b>Display</b>
<p/>
We will run the xqDoc scripts through the XQueryServlet. It is
also possible to install them as stored XQuery modules directly on the database
server. Once you have installed eXist, start the server as described in the documentation.
<p/>
Create a new directory "xqdoc" below the webapp directory in the eXist installation
directory. Copy the XQuery file
</font>
<p/>
<ul>
<font face="Arial" color="#666666" size="-1">
<li>xqdoc-display.xqy</li>
</font>
</ul>
<font face="Arial" color="#666666">
<p/>
from the <a href="downloads/xqdoc-jan2007-scripts-v1_3.zip">xqdoc-jan2007-scripts-v1_3.zip</a> package into the xqdoc directory.
<p/>
Next, copy
</font>
<p/>
<ul>
<font face="Arial" color="#666666" size="-1">
<li>default.xqy</li>
<li>get-code.xqy</li>
<li>get-module.xqy</li>
</font>
</ul>
<p/>
<font face="Arial" color="#666666">
shipped with the eXist <a href="downloads/xqdoc-eXist-driver-src-v1_0.zip">driver</a> to the same location. Those files contain
some vendor-specific function calls that have to be adopted for eXist.
<p/>
With the xqDoc XML stored in the database, it can now be viewed with the xqDoc
presentation scripts. If the xqDoc scripts were installed as described above, you
can view the xqDoc module home page at:
</font>
<p/>
<font face="Arial" color="#666666" size="-1">
http://localhost:8080/exist/xqdoc/default.xqy
</font>
<font face="Arial" color="#666666">
<p/>
<br/>
<b>Installation Verification</b>
<p/>
If user-defined XQuery library and main modules are not readily available, the xqDoc display scripts
can be used to verify the proper configuration of the eXist environment and usage of the eXist
provided drivers. To use these scripts, reference the eXist webapps/xqdoc directory (as the directory
for the .xqy files to process) when executing the EXistFileDriver. When the xqDoc presentation output is
viewed ...
<p/>
<font face="Arial" color="#666666" size="-1">
http://localhost:8080/exist/xqdoc/default.xqy
</font>
<p/>
<font face="Arial" color="#666666">
it should look very similar to the <a href="enhanced/default.html">enhanced</a> output. The main
difference will be the W3C XPath Functions and Operators will not be hypertext linked.
<p/>
</font>
</td>
</tr>
</table>
</body>
</html>