-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqs_marklogic.html
executable file
·388 lines (377 loc) · 13.7 KB
/
qs_marklogic.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
385
386
387
388
<html>
<head>
<title>xqDoc Project -- Quick Start [MarkLogic]</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>MarkLogic</i></font>
</td>
</tr>
</table>
<p/>
<table width="500" border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<font face="Arial" color="#666666">
The following instructions are based on MarkLogic XML Content Server
v3.0. However, none of the instructions are specific to this version
so it should work for subsequent versions (assuming the proper versions for MarkLogic XDBC .jar files are installed).
There may be some work needed to get MarkLogic working with the newer XCC .jar files. If anyone has time to get this
working, please feel free to modify and push the relevant changes.
<p/>
<br/>
<b>Setup</b>
<p/>
Although the following setup instructions do not have to be explicitly followed,
they offer a 'clean' approach for configuring a MarkLogic environment for xqDoc.
<ol>
<li>Create a Forest (named 'xqdoc') for storing xqDoc XML.</li>
<li>Create a Database (named 'xqdoc') for the xqDoc XML and reference the 'xqdoc' Forest previously
created.</li>
<li>Create an XDBC server and reference the 'xqdoc' Database previously created.
Set the 'library' for imports to 'xqdoc'.</li>
<li>Create an HTTP server and reference the same 'xqdoc' Database previously created.
Set the 'root' for the imports to 'xqdoc'.</li>
<li>Immediately under the MarkLogic installation directory, create a directory named 'xqdoc'.</li>
<li>Unzip the xqDoc Jan 2007 <a href="source.html">presentation</a> scripts into this 'xqdoc' directory.</li>
</ol>
<p/>
<br/>
<b>Software Requirements</b>
<p/>
The following software packages need to be specified in the Java ClassPath. The helpful
links below provide the location(s) for these packages.
<p/>
<a href="downloads/xqdoc-conversion-bin-v1_6.zip">xqdoc-conversion-bin-v1_6.zip</a>
<br/>
<font size="-1">Use the xqdoc_conv.jar for the xqDoc conversion package contained in the zip file.</font>
<p/>
<a href="downloads/xqdoc-marklogic-driver-bin-v1_0.zip">xqdoc-marklogic-driver-bin-v1_0.zip</a>
<br/>
<font size="-1">Use the xqdoc_ml.jar for the MarkLogic drivers contained in the zip file.</font>
<p/>
<a href="http://www.antlr.org">antlr-2.7.5.jar</a>
<br/>
<font size="-1">Use a minimum of the antlr-2.7.5.jar file.</font>
<p/>
<a href="http://www.jdom.org/dist/binary">jdom-1.1.zip</a>
<br/>
<font size="-1">Use the jdom.jar contained in the zip file.</font>
<p/>
<a href="http://xqzone.marklogic.com/svn/xqrunner/releases/">xqrunner</a>
<br/>
<font size="-1">Select the appropriate version and use use the xqrunner.jar contained in the zip file.</font>
<p/>
<a href="http://xqzone.marklogic.com/svn/xdbc/releases/">MarkXDBC</a>
<br/>
<font size="-1">Select the appropriate version and use the xdbc.jar, xdmp.jar, and xeval.jar contained in the zip file.</font>
<p/>
With MarkLogic properly configured and the necessary .jar files downloaded, it is time to begin
executing one of the MarkLogic drivers.
<p/>
<br/>
<b>MarkLogicFileDriver</b>
<p/>
This driver will process XQuery library and main modules from the file system and store the
resultant xqDoc XML into a MarkLogic database. The driver expects the following parameters:
<ul>
<li>Either a directory containing library and main modules (ending in .xqy) or an individual module name</li>
<li>The Address of the MarkLogic XDBC server that will access and store the xqDoc XML</li>
<li>The above MarkLogic XDBC server port number</li>
<li>The above MarkLogic XDBC server username</li>
<li>The above MarkLogic XDBC server password</li>
</ul>
<p/>
So, assuming that ...
<ul>
<li>the necessary .jar files are specified in the ClassPath</li>
<li>the library and main modules are available in e:\</li>
<li>the MarkLogic XDBC server address is 24.15.60.100</li>
<li>the XDBC port is 2000</li>
<li>the username is 'darin'</li>
<li>the password is 'xqdoc'</li>
</ul>
the invocation should look as follows ...
<p/>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>java</td>
<td>org.xqdoc.drivers.marklogic.MarkLogicFileDriver</td>
</tr>
<tr>
<td/>
<td>e:\</td>
</tr>
<tr>
<td/>
<td>24.15.60.100</td>
</tr>
<tr>
<td/>
<td>2000</td>
</tr>
<tr>
<td/>
<td>darin</td>
</tr>
<tr>
<td/>
<td>xqdoc</td>
</tr>
</table>
<p/>
<br/>
<b>MarkLogicModuleDriver</b>
<p/>
This driver will process XQuery library and main modules stored in a MarkLogic modules database
and store the resultant xqDoc XML into a MarkLogic database. The driver expects the following
parameters:
<ul>
<li>Address of the MarkLogic XDBC server with access to the modules database</li>
<li>The above MarkLogic XDBC server port number</li>
<li>The above MarkLogic XDBC server username</li>
<li>The above MarkLogic XDBC server password</li>
<li>The Address of the MarkLogic XDBC server that will access and store the xqDoc XML</li>
<li>The above MarkLogic XDBC server port number</li>
<li>The above MarkLogic XDBC server username</li>
<li>The above MarkLogic XDBC server password</li>
</ul>
So, assuming that ...
<ul>
<li>the necessary .jar files are specified in the ClassPath</li>
<li>the MarkLogic XDBC server address for the modules database is 24.15.60.100</li>
<li>the XDBC port for this server is 4000</li>
<li>the username is 'darby'</li>
<li>the password is 'modules'</li>
<li>the MarkLogic XDBC server address for the xqDoc XML database is 24.15.60.100</li>
<li>the XDBC port for this server is 2000</li>
<li>the username is 'darin'</li>
<li>the password is 'xqdoc'</li>
</ul>
the invocation should look as follows ...
<p/>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>java</td>
<td>org.xqdoc.drivers.marklogic.MarkLogicModuleDriver</td>
</tr>
<tr>
<td/>
<td>24.15.60.100</td>
</tr>
<tr>
<td/>
<td>4000</td>
</tr>
<tr>
<td/>
<td>darby</td>
</tr>
<tr>
<td/>
<td>modules</td>
</tr>
<tr>
<td/>
<td>24.15.60.100</td>
</tr>
<tr>
<td/>
<td>2000</td>
</tr>
<tr>
<td/>
<td>darin</td>
</tr>
<tr>
<td/>
<td>xqdoc</td>
</tr>
</table>
<p/>
<br/>
<b>MarkLogicZipDriver</b>
<p/>
This driver will process all of the xqDoc XML files stored in the 'xqdoc' collection of the XML database and
create a static view of the documentation by creating numerous HTML files and placing them
into a zip file named xqdoc.zip. This view of xqDoc XML is useful for those people who may
not have access to the MarkLogic XML Content Server to dynamically render the content via scripts.
Instead, an appointed person can create the .zip file and disseminate to the appropriate people.
The driver expects the following parameters:
<ul>
<li>Directory where to place the generated xqdoc.zip file</li>
<li>The Address of the MarkLogic XDBC server that will access the xqDoc XML</li>
<li>The above MarkLogic XDBC server port number</li>
<li>The above MarkLogic XDBC server username</li>
<li>The above MarkLogic XDBC server password</li>
</ul>
<p/>
So, assuming that ...
<ul>
<li>the necessary .jar files are specified in the ClassPath</li>
<li>the xqDoc presentation scripts have installed in the root directory</li>
<li>the MarkLogic XDBC server address is 24.15.60.100</li>
<li>the XDBC port is 2000</li>
<li>the username is 'darin'</li>
<li>the password is 'xqdoc'</li>
</ul>
the invocation should look as follows ...
<p/>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>java</td>
<td>org.xqdoc.drivers.marklogic.MarkLogicZipDriver</td>
</tr>
<tr>
<td/>
<td>24.15.60.100</td>
</tr>
<tr>
<td/>
<td>2000</td>
</tr>
<tr>
<td/>
<td>darin</td>
</tr>
<tr>
<td/>
<td>xqdoc</td>
</tr>
</table>
<p/>
<br/>
<b>Display</b>
<p/>
With the xqDoc XML stored in the database, it can now be viewed with the xqDoc
presentation scripts.
<p/>
So, assuming that ...
<ul>
<li>the xqDoc presentation scripts have been unzipped in the MarkLogic HTTP server (with access to the xqDoc XML) root directory</li>
<li>the xqDoc XML has been stored into the MarkLogic database with either the File driver or Module driver</li>
<li>the address and port for the MarkLogic HTTP server (with access to the xqDoc XML) is 24.15.60.100 and 1000</li>
</ul>
The xqDoc module home page can be accessed with the following url:
<p/>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="10"> </td>
<td>http://24.15.60.100:1000/default.xqy</td>
</tr>
</table>
<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 MarkLogic environment and usage of the MarkLogic
provided drivers. Simply unzip the xqDoc display <a href="downloads/xqdoc-jan2007-scripts-v1_3.zip">scripts</a> into a directory and then
specify that directory when executing the MarkLogicFileDriver. When the xqDoc presentation output is
viewed, 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/>
<br/>
</td>
</tr>
</table>
</body>
</html>