jruby-existdb 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. data/conf.xml +812 -0
  2. data/lib/existdb.rb +74 -0
  3. data/lib/existdb/classwrap.rb +70 -0
  4. data/lib/existdb/collection.rb +98 -0
  5. data/lib/existdb/dom/active_record.rb +82 -0
  6. data/lib/existdb/dom/mapper.rb +285 -0
  7. data/lib/existdb/embedded.rb +84 -0
  8. data/lib/existdb/index_factory.rb +120 -0
  9. data/lib/existdb/meta.rb +41 -0
  10. data/lib/existdb/resource/base.rb +84 -0
  11. data/lib/existdb/resource/binary.rb +21 -0
  12. data/lib/existdb/resource/xml.rb +23 -0
  13. data/lib/existdb/resource_set.rb +34 -0
  14. data/lib/existdb/xql_factory.rb +191 -0
  15. data/lib/existdb/xquery_service.rb +11 -0
  16. data/lib/jars/antlr-2.7.7.jar +0 -0
  17. data/lib/jars/commons-collections-3.2.1.jar +0 -0
  18. data/lib/jars/commons-logging-1.1.1.jar +0 -0
  19. data/lib/jars/commons-pool-1.5.1.jar +0 -0
  20. data/lib/jars/endorsed/resolver-1.2.jar +0 -0
  21. data/lib/jars/endorsed/serializer-2.9.1.jar +0 -0
  22. data/lib/jars/endorsed/xalan-2.7.1.jar +0 -0
  23. data/lib/jars/endorsed/xercesImpl-2.9.1.jar +0 -0
  24. data/lib/jars/endorsed/xml-apis-1.3.04.jar +0 -0
  25. data/lib/jars/exist-lucene-module.jar +0 -0
  26. data/lib/jars/exist-modules.jar +0 -0
  27. data/lib/jars/exist.jar +0 -0
  28. data/lib/jars/extensions/exist-lucene-module.jar +0 -0
  29. data/lib/jars/extensions/exist-ngram-module.jar +0 -0
  30. data/lib/jars/extensions/exist-versioning.jar +0 -0
  31. data/lib/jars/extensions/lucene-core-2.4.1.jar +0 -0
  32. data/lib/jars/extensions/lucene-regex-2.4.1.jar +0 -0
  33. data/lib/jars/jgroups-all-2.2.6.jar +0 -0
  34. data/lib/jars/jta-1.1.jar +0 -0
  35. data/lib/jars/log4j-1.2.15.jar +0 -0
  36. data/lib/jars/lucene-core-2.4.1.jar +0 -0
  37. data/lib/jars/lucene-regex-2.4.1.jar +0 -0
  38. data/lib/jars/quartz-1.6.5.jar +0 -0
  39. data/lib/jars/sunxacml-1.2.jar +0 -0
  40. data/lib/jars/xmldb.jar +0 -0
  41. data/lib/jars/xmlrpc-client-3.1.2.jar +0 -0
  42. data/lib/jars/xmlrpc-common-3.1.2.jar +0 -0
  43. data/lib/jars/xmlrpc-server-3.1.2.jar +0 -0
  44. data/log4j.xml +190 -0
  45. metadata +104 -0
@@ -0,0 +1,812 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ This is the central configuration file for the database. If the database
4
+ is running in a servlet-context, the configuration file will be read from
5
+ the WEB-INF directory of the web application. Otherwise, the configuration
6
+ is read from the directory specified by the exist.home system property.
7
+
8
+ Structure of this xml document:
9
+
10
+ exist
11
+ cluster
12
+ db-connection
13
+ default-permissions
14
+ pool
15
+ recovery
16
+ security
17
+ watchdog
18
+ indexer
19
+ scheduler
20
+ job
21
+ serializer
22
+ transformer
23
+ validation
24
+ xquery
25
+ builtin-modules
26
+ module
27
+ xupdate
28
+
29
+
30
+ For detailed and latest information please consult the eXist documentation:
31
+
32
+ - http://exist-db.org/configuration.html
33
+ - http://exist-db.org/cluster.html
34
+ - http://exist-db.org/documentation.html
35
+ - http://atomic.exist-db.org/
36
+
37
+ $Id: conf.xml.tmpl 10380 2009-11-08 10:23:33Z wolfgang_m $
38
+
39
+ -->
40
+ <exist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
41
+ xsi:noNamespaceSchemaLocation="schema/conf.xsd">
42
+
43
+ <!--
44
+ Configures the cluster configuration.
45
+
46
+ - dbaUser:
47
+ defines the user used by the cluster for the replica.
48
+
49
+ - dbaPassword:
50
+ defines the user password used by the cluster for the replica.
51
+
52
+ - exclude:
53
+ some collections should be signed as no-replicated collections i.e.
54
+ during the replica phase eXist cluster environment doesn't send
55
+ events based on these collections, colon is the separator char when
56
+ more than one collection is added.
57
+
58
+ - journalDir:
59
+ specifies the folder where the eXist cluster node saves its journal
60
+ file. Directory is automatically created if it doesn't exist. If no
61
+ journaldir is specified, journal is disabled.
62
+
63
+ - protocol:
64
+ defines a protocol stack. Refers the jgroups protocol stack.
65
+ -->
66
+ <cluster dbaPassword="" dbaUser="admin" exclude="/db/system,/db/system/config"
67
+ journalDir="data/journal"
68
+ protocol="UDP(mcast_addr=228.1.2.3;mcast_port=45566;ip_ttl=8;ip_mcast=true;mcast_send_buf_size=800000;mcast_recv_buf_size=150000;ucast_send_buf_size=800000;ucast_recv_buf_size=150000;loopback=true):PING(timeout=2000;num_initial_members=3;up_thread=true;down_thread=true):MERGE2(min_interval=10000;max_interval=20000):FD(shun=true;up_thread=true;down_thread=true;timeout=2500;max_tries=5):VERIFY_SUSPECT(timeout=3000;num_msgs=3;up_thread=true;down_thread=true):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192;up_thread=true;down_thread=true):UNICAST(timeout=300,600,1200,2400,4800;window_size=100;min_threshold=10;down_thread=true):pbcast.STABLE(desired_avg_gossip=20000;up_thread=true;down_thread=true):FRAG(frag_size=8192;down_thread=true;up_thread=true):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=true;print_local_addr=true)"/>
69
+
70
+ <!--
71
+ Configures the database backend.
72
+
73
+ - cacheSize:
74
+ the maximum amount of memory to use for database page buffers.
75
+ Each database file has an associated page buffer for B+-tree and
76
+ data pages. However, the memory specified via cacheSize is shared
77
+ between all page buffers. It represents an absolute maximum, which
78
+ would be occupied if all page buffers were completely full.
79
+
80
+ The cacheSize should not be more than half of the size of the JVM
81
+ heap size (set by the JVM -Xmx parameter).
82
+
83
+ - collectionCache:
84
+ maximum amount of memory (in megabytes) to use for collection caches.
85
+ Memory calculation is just approximate. If your collections are very
86
+ different in size, it might be possible that the actual amount of
87
+ memory used exceeds the specified limit. You should thus be careful
88
+ with this setting.
89
+
90
+ - database:
91
+ selects a database backend. Currently, "native" and "native_cluster"
92
+ are the only valid setting.
93
+
94
+ - files:
95
+ path to the directory where database files are stored.
96
+
97
+ - pageSize:
98
+ the size of one page on the disk. This is the smallest unit
99
+ transferred from and to the database files. Should be a multiple of
100
+ the operating system's file system page size (usually 4096).
101
+
102
+ - nodesBuffer:
103
+ size of the temporary buffer used by eXist for caching index
104
+ data while indexing a document. If set to -1, eXist will use the
105
+ entire free memory to buffer index entries and will flush the
106
+ cache once the memory is full.
107
+
108
+ If set to a value > 0, the buffer will be fixed to the given size.
109
+ The specified number corresponds to the number of nodes the
110
+ buffer can hold, in thousands. Usually, a good default could be
111
+ nodesBuffer="1000".
112
+ =====================================================================
113
+
114
+ The settings below are very conservative to avoid out-of-memory
115
+ exceptions on machines with limited memory (256MB).
116
+
117
+ Increase the buffer settings for elements_buffers and words_buffers if
118
+ you have some more memory to waste. If you deal with lots of
119
+ collections, you can also increase the collectionCacheSize value
120
+ -->
121
+ <db-connection cacheSize="48M" collectionCache="24M" database="native"
122
+ files="data" pageSize="4096" nodesBuffer="-1">
123
+
124
+ <!--
125
+ Specifies the default permissions for all resources and collections
126
+ in eXist (see User Authentication and Access Control). When this is
127
+ not configured, the default "mod" (similar to the Unix "chmod"
128
+ command) is set to 0775 in the resources and collections attributes.
129
+
130
+ A different default value may be set for a database instance, and
131
+ local overrides are also possible.
132
+ -->
133
+ <!--
134
+ <default-permissions collection="0775" resource="0775" />
135
+ -->
136
+
137
+ <!--
138
+ Settings for the database connection pool:
139
+
140
+ - min:
141
+ minimum number of connections to keep alive.
142
+
143
+ - max:
144
+ maximum number of connections allowed.
145
+
146
+ - sync-period:
147
+ defines how often the database will flush its
148
+ internal buffers to disk. The sync thread will interrupt
149
+ normal database operation after the specified number of
150
+ milliseconds and write all dirty pages to disk.
151
+
152
+ - wait-before-shutdown:
153
+ defines how long the database instance will wait for running
154
+ operations to complete before it forces a shutdown. Forcing
155
+ a shutdown may leave the db in an unclean state and may
156
+ trigger a recovery run on restart.
157
+
158
+ Setting wait-before-shutdown="-1" means that the server will
159
+ wait for all threads to return, no matter how long it takes.
160
+ No thread will be killed.
161
+ -->
162
+ <pool max="20" min="1" sync-period="120000" wait-before-shutdown="120000"/>
163
+
164
+ <!--
165
+ Configure the query pool.
166
+
167
+ - max-stack-size:
168
+ maximum number of queries in the query-pool.
169
+
170
+ - size:
171
+ number of copies of the same query kept in the query-pool.
172
+ Value "-1" effectively disables caching. Queries cannot be shared
173
+ by threads, each thread needs a private copy of a query.
174
+
175
+ - timeout:
176
+ amount of time that a query will be cached in the query-pool.
177
+
178
+ - timeout-check-interval:
179
+ time between checking for timed out queries. For value "-1"
180
+ the time out is switched off, resulting cached queries to remain
181
+ in the cache forever.
182
+ -->
183
+ <query-pool max-stack-size="5" size="128" timeout="120000"
184
+ timeout-check-interval="30000"/>
185
+
186
+ <!--
187
+ Settings for the journaling and recovery of the database. With
188
+ recovery enabled, the database is able to recover from an unclean
189
+ database shutdown due to, for example, power failures, OS reboots,
190
+ and hanging processes. For this to work correctly, all database
191
+ operations must be logged to a journal file.
192
+
193
+ - enabled:
194
+ if this attribute is set to yes, automatic recovery is enabled.
195
+
196
+ - journal-dir:
197
+ this attribute sets the directory where journal files are to be
198
+ written. If no directory is specified, the default path is to
199
+ the data directory.
200
+
201
+ - size:
202
+ this attributes sets the maximum allowed size of the journal
203
+ file. Once the journal reaches this limit, a checkpoint will be
204
+ triggered and the journal will be cleaned. However, the database
205
+ waits for running transactions to return before processing this
206
+ checkpoint. In the event one of these transactions writes a lot
207
+ of data to the journal file, the file will grow until the
208
+ transaction has completed. Hence, the size limit is not enforced
209
+ in all cases.
210
+
211
+ - sync-on-commit:
212
+ this attribute determines whether or not to protect the journal
213
+ during operating system failures. That is, it determines whether
214
+ the database forces a file-sync on the journal after every
215
+ commit.
216
+ If this attribute is set to "yes", the journal is protected
217
+ against operating system failures. However, this will slow
218
+ performance - especially on Windows systems.
219
+ If set to "no", eXist will rely on the operating system to flush
220
+ out the journal contents to disk. In the worst case scenario,
221
+ in which there is a complete system failure, some committed
222
+ transactions might not have yet been written to the journal,
223
+ and so will be rolled back.
224
+
225
+ - group-commit:
226
+ If set to "yes", eXist will not sync the journal file
227
+ immediately after every transaction commit. Instead,
228
+ it will wait until the current file buffer (32kb)
229
+ is really full. This can speed up eXist on some systems
230
+ where a file sync is an expensive operation (mainly windows
231
+ XP; not necessary on Linux). However, group-comit="yes"
232
+ will increase the risk of an already committed
233
+ operation being rolled back after a database crash.
234
+
235
+ - force-restart:
236
+ Try to restart the db even if crash recovery failed. This is
237
+ dangerous because there might be corruptions inside the
238
+ data files. The transaction log will be cleared, all locks removed
239
+ and the db reindexed.
240
+
241
+ Set this option to "yes" if you need to make sure that the db is
242
+ online, even after a fatal crash. Errors encountered during recovery
243
+ are written to the log files. Scan the log files to see if any problems
244
+ occurred.
245
+
246
+ - consistency-check:
247
+ If set to "yes", a consistency check will be run on the database
248
+ if an error was detected during crash recovery. This option requires
249
+ force-restart to be set to "yes", otherwise it has no effect.
250
+
251
+ The consistency check outputs a report to the directory {files}/sanity
252
+ and if inconsistencies are found in the db, it writes an emergency
253
+ backup to the same directory.
254
+ -->
255
+ <recovery enabled="yes" group-commit="no"
256
+ journal-dir="data" size="100M"
257
+ sync-on-commit="no" force-restart="no"
258
+ consistency-check="yes"/>
259
+
260
+ <!--
261
+ The <security> element in the <db-connection> node is used to select
262
+ the security manager Class and control the database of users and
263
+ groups.
264
+
265
+ - class:
266
+ this attribute is required, and specifies a Java class name used
267
+ to implement the org.exist.security.SecurityManager interface,
268
+ as in the following example:
269
+
270
+ Example: <security> class Attribute (LDAP)
271
+ <security class="org.exist.security.LDAPSecurityManager" />
272
+
273
+ eXist is distributed with the following built-in security manager
274
+ implementations:
275
+
276
+ - org.exist.security.XMLSecurityManager
277
+
278
+ stores the user information in the database. This is the
279
+ default manager if the <security> element is not included
280
+ in <db-connection>.
281
+
282
+ - org.exist.security.LDAPSecurityManager
283
+
284
+ retrieves the user and groups from the LDAP database. This
285
+ requires addition configuration parameters which are
286
+ described in the LDAP Security Manager documentation.
287
+
288
+ - password-encoding:
289
+ password encoding can be set to one of the following types:
290
+
291
+ - plain:
292
+ applies plain encryption.
293
+
294
+ - md5: (default)
295
+ applies the MD5 algorithm to encrypt passwords.
296
+
297
+ - simple-md5:
298
+ applies a simplified MD5 algorithm to encrypt passwords.
299
+
300
+ - password-realm:
301
+ the realm to use for basic auth or http-digest password
302
+ challenges.
303
+ -->
304
+ <!--
305
+ <security class="org.exist.security.LDAPSecurityManager" />
306
+ -->
307
+
308
+ <!--
309
+ This is the global configuration for the query watchdog. The
310
+ watchdog monitors all query processes, and can terminate any
311
+ long-running queries if they exceed one of the predefined limits.
312
+ These limits are as follows:
313
+
314
+ - output-size-limit:
315
+ this attribute limits the size of XML fragments constructed
316
+ using XQuery, and thus sets the maximum amount of main memory a
317
+ query is allowed to use. This limit is expressed as the maximum
318
+ number of nodes allowed for an in-memory DOM tree. The purpose
319
+ of this option is to avoid memory shortages on the server in
320
+ cases where users are allowed to run queries that produce very
321
+ large output fragments.
322
+
323
+ - query-timeout:
324
+ this attribute sets the maximum amount of time (expressed in
325
+ milliseconds) that the query can take before it is killed..
326
+
327
+ -->
328
+ <watchdog output-size-limit="1000000" query-timeout="-1"/>
329
+
330
+ </db-connection>
331
+
332
+ <!--
333
+ Settings for the indexer:
334
+
335
+ - caseSensitive:
336
+ should equality comparisons between strings be case-sensitive or
337
+ insensitive: "yes" or "no".
338
+
339
+ - index-depth:
340
+ defines the maximum nesting depth of nodes which will be indexed
341
+ in the DOM index. Nodes below the specified nesting depth will
342
+ not be indexed in the DOM file. This has only an effect when
343
+ retrieving query results or for some types of XPath subexpressions,
344
+ like equality comparisons.
345
+
346
+ - stemming:
347
+ eXist includes a very simple english language stemmer, based on
348
+ Porter's algorithm. Set the "stemming"-option to "true" if you
349
+ would like to use stemming. This does only work for english.
350
+
351
+ - suppress-whitespace:
352
+ should leading or trailing whitespace be removed from a text node?
353
+ Set to "leading", "trailing", "both" or "none".
354
+ Changing the parameter will only have an effect on newly loaded
355
+ files, not old ones.
356
+
357
+ - suppress-whitespace-mixed-content:
358
+ preserve the white space inside a mixed content node
359
+
360
+ - tokenizer:
361
+ this attribute invokes the Java class used to tokenize a string into
362
+ a sequence of single words or tokens, which are stored to the
363
+ fulltext index. Currently only the SimpleTokenizer is available.
364
+
365
+ - track-term-freq:
366
+ not documented.
367
+ -->
368
+ <indexer caseSensitive="yes" index-depth="5" preserve-whitespace-mixed-content="no"
369
+ stemming="no" suppress-whitespace="none"
370
+ tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes">
371
+
372
+ <modules>
373
+ <module id="ngram-index" class="org.exist.indexing.ngram.NGramIndex"
374
+ file="ngram.dbx" n="3"/>
375
+
376
+ <!--
377
+ <module id="spatial-index" class="org.exist.indexing.spatial.GMLHSQLIndex"
378
+ -->
379
+
380
+ <module id="lucene-index" class="org.exist.indexing.lucene.LuceneIndex"
381
+ buffer="32"/>
382
+
383
+ <!--
384
+ The full text index is always required and should
385
+ not be disabled. We still have some dependencies on
386
+ this index in the database core. These will be removed
387
+ once the redesign has been completed.
388
+ -->
389
+ <module id="ft-legacy-index" class="org.exist.fulltext.FTIndex"/>
390
+
391
+ <!--
392
+ The following module is not really an index (though it sits
393
+ in the index pipeline). It gathers relevant statistics on the
394
+ distribution of elements in the database, which can be used
395
+ by the query optimizer for additional optimizations.
396
+ -->
397
+ <!--
398
+ <module id="index-stats" class="org.exist.storage.statistics.IndexStatistics"
399
+ file="stats.dbx"/>
400
+ -->
401
+ </modules>
402
+
403
+ <!--
404
+ The file for this element points to a file containing a list of
405
+ stopwords. Note that stopwords are NOT added to the fullext index.
406
+ -->
407
+ <stopwords file="stopword"/>
408
+
409
+ <!--
410
+ Default index settings. Default settings apply if there's no
411
+ collection-specific configuration for a collection.
412
+ -->
413
+ <index>
414
+ <fulltext attributes="false" default="none">
415
+ <exclude path="/auth"/>
416
+ </fulltext>
417
+ </index>
418
+ </indexer>
419
+
420
+ <!--
421
+ Configures user jobs for the scheduler
422
+ -->
423
+ <scheduler>
424
+ <!--
425
+ Job definitions:
426
+
427
+ - type:
428
+ The type of the job to schedule. Must be either "startup", "system"
429
+ or "user".
430
+
431
+ startup - Startup jobs are executed once during the
432
+ database startup but before the database becomes available,
433
+ these jobs are synchronous.
434
+
435
+ system - System jobs require the database to be in a consistent state.
436
+ All database operations will be stopped until the method returns or
437
+ throws an exception. Any exception will be caught and a warning written to
438
+ the log.
439
+
440
+ user - User jobs may be scheduled at any time and may be mutually exclusive
441
+ or non-exclusive
442
+
443
+ - class:
444
+ If the job is written in Java then this should be the name of the
445
+ class that extends either -
446
+ org.exist.scheduler.StartupJob
447
+ org.exist.storage.SystemTask
448
+ org.exist.scheduler.UserJavaJob
449
+
450
+ - xquery:
451
+ If the job is written in XQuery (not suitable for system jobs) then
452
+ this should be a path to an XQuery stored in the database. e.g.
453
+ /db/myCollection/myJob.xql
454
+ XQuery job's will be launched under the guest account initially,
455
+ although the running XQuery may switch permissions through
456
+ calls to xmldb:login().
457
+
458
+ - cron-trigger:
459
+ To define a firing pattern for the Job using Cron style syntax
460
+ use this attribute otherwise for a periodic job use the period
461
+ attribute. Not applicable to startup jobs.
462
+
463
+ - period:
464
+ Can be used to define an explicit period for firing the job instead
465
+ of a Cron style syntax. The period should be in milliseconds.
466
+ Not applicable to startup jobs.
467
+
468
+ - delay:
469
+ Can be used with a period to delay the start of a job. If unspecified jobs
470
+ will start as soon as the database and scheduler are initialised.
471
+
472
+ - repeat:
473
+ Can be used with a period to define for how many periods a job should be
474
+ executed. If unspecified jobs will repeat for every period indefinitely.
475
+ -->
476
+ <!--
477
+ <job class="bar.foo.myjob" period="600000" delay="300000" repeat="10" />
478
+ -->
479
+
480
+ <!--
481
+ Run a consistency check on the database. This will detect inconsistencies
482
+ or corruptions in documents or the collection store. The task can also
483
+ be used to create automatic backups. The backup routine is faster than
484
+ the one in the standard backup tool and it tries to export as much data
485
+ as possible, even if parts of the collection tree are destroyed.
486
+
487
+ If errors are detected during the consistency check, the job will
488
+ automatically start creating a backup.
489
+
490
+ Errors are reported via the JMX object with the name:
491
+
492
+ org.exist.management.tasks:type=SanityReport
493
+
494
+ Parameters:
495
+ output The output directory used by the job. The path is interpreted
496
+ relative to the data directory (WEB-INF/data).
497
+
498
+ backup Set to "yes" to create a backup whenever the job runs, not just
499
+ when it detects errors.
500
+ -->
501
+ <!--
502
+ <job type="system" name="check1"
503
+ class="org.exist.storage.ConsistencyCheckTask"
504
+ cron-trigger="0 0 * * * ?">
505
+ <parameter name="output" value="export"/>
506
+ <parameter name="backup" value="yes"/>
507
+ <parameter name="incremental" value="no"/>
508
+ <parameter name="incremental-check" value="no"/>
509
+ <parameter name="max" value="2"/>
510
+ </job>
511
+ -->
512
+
513
+ <!--
514
+ Automatically creates a copy of the database .dbx files every 2 minutes
515
+
516
+ Parameters:
517
+ output-dir:
518
+ The directory into which the copy will be written
519
+ -->
520
+ <!--
521
+ <job type="system" name="databackup"
522
+ class="org.exist.storage.DataBackup" period="120000">
523
+ <parameter name="output-dir" value="backup" />
524
+ </job>
525
+ -->
526
+
527
+ </scheduler>
528
+
529
+ <!--
530
+ Default settings for the serializer. Most of these can be changed
531
+ by client code:
532
+
533
+ - add-exist-id:
534
+ for debugging: add an exist:id attribute to every element, showing
535
+ the internal node identifier (as a long int) assigned to this node.
536
+ Possible values are: "none", "element", "all". "all" displays the
537
+ node of every element node; "element" displays the id only for the
538
+ root nodes of the returned XML fragments.
539
+
540
+ - compress-output:
541
+ should the output be compressed when serializing documents?
542
+ Sometimes useful with remote clients.
543
+ Remember to add a statement like this to your client code:
544
+ service.setProperty("compress-output", "yes");
545
+ to uncompress the retrieved result in the client too.
546
+
547
+ - enable-xinclude:
548
+ should the database expand XInclude tags by default?
549
+
550
+ - enable-xsl:
551
+ should the database evaluate XSL processing instructions
552
+ when serializing documents?
553
+
554
+ - indent:
555
+ should the serializer pretty-print (indent) XML?
556
+
557
+ - match-tagging-attributes:
558
+ matches for attribute values can also be tagged using the character
559
+ sequence "||" to demarcate the matching text string. Since this
560
+ changes the content of the attribute value, the feature is disabled
561
+ by default.
562
+
563
+ - match-tagging-elements:
564
+ the database can highlight matches in the text content of a node by
565
+ tagging the matching text string with <exist:match>. Clearly, this
566
+ only works for XPath expressions using the fulltext index.
567
+
568
+ Set the parameter to "yes" to enable this feature.
569
+
570
+ -->
571
+ <serializer add-exist-id="none" compress-output="no" enable-xinclude="yes"
572
+ enable-xsl="no" indent="yes" match-tagging-attributes="no"
573
+ match-tagging-elements="no">
574
+ <!--custom-filter class="org.exist.versioning.VersioningFilter"/-->
575
+ </serializer>
576
+
577
+ <!--
578
+ Default settings for the XSLT Transformer. Allow's for a choice of
579
+ implementation:
580
+
581
+ - class:
582
+ the name of the class that implements javax.xml.transform.TransformerFactory
583
+
584
+ for Saxon (XSLT 2.0 support):
585
+ - "net.sf.saxon.TransformerFactoryImpl"
586
+
587
+ You will need to copy saxon8.jar saxon8-dom.jar and saxon8-xpath.jar
588
+ into lib/endorsed.
589
+ You can get these from http://sourceforge.net/projects/saxon
590
+
591
+ for Xalan (XSLT 1.0 support):
592
+ - "org.apache.xalan.processor.TransformerFactoryImpl"
593
+ - caching:
594
+ You can enable or disable xsl caching by this option.
595
+ This option is set to "yes" by default.
596
+
597
+ For further details see - http://atomic.exist-db.org/wiki/HowTo/XSLT2/
598
+
599
+ You can also include attribute child elements, if you wish to pass in
600
+ attributes to your particular TransformerFactory as follows:
601
+
602
+ <transformer class="net.sf.saxon.TransformerFactoryImpl">
603
+ <attribute name="http://saxon.sf.net/feature/version-warning"
604
+ value="false" type="boolean"/>
605
+ </transformer>
606
+
607
+ The example above sets Saxon to suppress warnings when executing a
608
+ XSLT 1.0 stylesheet with the XLST 2.0 processor. Check the
609
+ documentation for your selected TransformerFactory to determine which
610
+ attributes can be set. Valid types include "boolean", "integer"
611
+ and "string". Anything else will be treated as type "string".
612
+
613
+ -->
614
+ <transformer
615
+ class="org.apache.xalan.processor.TransformerFactoryImpl" caching="yes"/>
616
+
617
+ <!--
618
+ Settings for XML validation
619
+ - mode
620
+ should XML source files be validated against a schema or DTD before
621
+ storing them? The setting is passed to the XML parser. The actual
622
+ effects depend on the parser you use. eXist comes with Xerces which
623
+ can validate against both: schemas and DTDs.
624
+
625
+ Possible values: "yes", "no", "auto". "auto" will leave validation
626
+ to the parser.
627
+
628
+ -->
629
+ <validation mode="no">
630
+ <!--
631
+ Specify the location of one or more catalog files. Catalogs are
632
+ used to resolve external entities in XML documents.
633
+
634
+ "${WEBAPP_HOME}" can be used as magic string.
635
+ -->
636
+ <entity-resolver>
637
+ <catalog uri="${WEBAPP_HOME}/WEB-INF/catalog.xml"/>
638
+ </entity-resolver>
639
+ </validation>
640
+
641
+ <!--
642
+ Define modules that contain xQuery functions.
643
+
644
+ - enable-java-binding:
645
+ eXist supports calls to arbitrary Java methods from within
646
+ XQuery. Setting to "yes" might introduce a security risk.
647
+ - disable-deprecated-functions:
648
+ Set to "yes" to disable deprecated functions
649
+ - enable-query-rewriting:
650
+ Set to "yes" to enable the new query-rewriting optimizer. This
651
+ is work in progress and may lead to incorrect queries. Use at your
652
+ own risk.
653
+ - backwardCompatible:
654
+ Set to "yes" to enable backward compatibility (untyped argument
655
+ checks for instance)
656
+ - raise-error-on-failed-retrieval
657
+ Set to "yes" if a call to doc(), xmldb:document(), collection() or
658
+ xmldb:xcollection() should raise an error (FODC0002) when an
659
+ XML resource can not be retrieved.
660
+ Set to "no" if a call to doc(), xmldb:document(), collection() or
661
+ xmldb:xcollection() should return an empty sequence when an
662
+ XML resource can not be retrieved.
663
+ -->
664
+ <xquery enable-java-binding="no" disable-deprecated-functions="no"
665
+ enable-query-rewriting="yes" backwardCompatible="no"
666
+ raise-error-on-failed-retrieval="no">
667
+ <builtin-modules>
668
+ <!-- Default Modules -->
669
+ <module class="org.exist.xquery.functions.util.UtilModule"
670
+ uri="http://exist-db.org/xquery/util"/>
671
+ <module class="org.exist.xquery.functions.transform.TransformModule"
672
+ uri="http://exist-db.org/xquery/transform"/>
673
+ <module class="org.exist.xquery.functions.xmldb.XMLDBModule"
674
+ uri="http://exist-db.org/xquery/xmldb"/>
675
+ <!-- ***Commented out*** Requires exist-optional.jar
676
+ <module class="org.exist.xquery.functions.request.RequestModule"
677
+ uri="http://exist-db.org/xquery/request"/>
678
+ -->
679
+ <module class="org.exist.xquery.functions.response.ResponseModule"
680
+ uri="http://exist-db.org/xquery/response"/>
681
+ <module class="org.exist.xquery.functions.session.SessionModule"
682
+ uri="http://exist-db.org/xquery/session"/>
683
+ <module class="org.exist.xquery.functions.text.TextModule"
684
+ uri="http://exist-db.org/xquery/text"/>
685
+ <module class="org.exist.xquery.modules.example.ExampleModule"
686
+ uri="http://exist-db.org/xquery/examples"/>
687
+ <module class="org.exist.xquery.functions.validation.ValidationModule"
688
+ uri="http://exist-db.org/xquery/validation"/>
689
+ <module class="org.exist.xquery.functions.system.SystemModule"
690
+ uri="http://exist-db.org/xquery/system"/>
691
+
692
+ <!-- New Modularized Indexes -->
693
+ <module class="org.exist.xquery.modules.ngram.NGramModule"
694
+ uri="http://exist-db.org/xquery/ngram"/>
695
+ <!--
696
+ <module class="org.exist.xquery.modules.spatial.SpatialModule"
697
+ uri="http://exist-db.org/xquery/spatial" />
698
+ -->
699
+
700
+ <module class="org.exist.xquery.modules.lucene.LuceneModule"
701
+ uri="http://exist-db.org/xquery/lucene"/>
702
+
703
+ <!-- KWIC module -->
704
+ <module src="resource:org/exist/xquery/lib/kwic.xql"
705
+ uri="http://exist-db.org/xquery/kwic"/>
706
+
707
+ <!-- Sequences module -->
708
+ <module src="resource:org/exist/xquery/lib/sequences.xq"
709
+ uri="http://exist-db.org/xquery/sequences"/>
710
+
711
+ <!-- Versioning -->
712
+ <module src="resource:org/exist/versioning/xquery/versioning.xqm"
713
+ uri="http://exist-db.org/versioning"/>
714
+
715
+ <!-- JSON module -->
716
+ <module src="resource:org/exist/xquery/lib/json.xq"
717
+ uri="http://www.json.org"/>
718
+
719
+ <!-- expath module imports (for p:http-request)//-->
720
+ <!-- *** Commented Out *** Requires org/apache/commons/httpclient/URIException
721
+ <module class="org.exist.xquery.modules.httpclient.HTTPClientModule"
722
+ uri="http://exist-db.org/xquery/httpclient" />
723
+ <module src="resource:org/expath/www/mod/http-client/http-client.xqm"
724
+ uri="http://www.expath.org/mod/http-client"/>
725
+ -->
726
+ <!-- xprocxq module imports //-->
727
+ <module src="resource:net/xproc/xprocxq/src/xquery/const.xqm"
728
+ uri="http://xproc.net/xproc/const"/>
729
+ <module src="resource:net/xproc/xprocxq/src/xquery/xproc.xqm"
730
+ uri="http://xproc.net/xproc"/>
731
+ <module src="resource:net/xproc/xprocxq/src/xquery/util.xqm"
732
+ uri="http://xproc.net/xproc/util"/>
733
+ <module src="resource:net/xproc/xprocxq/src/xquery/functions.xqm"
734
+ uri="http://xproc.net/xproc/functions"/>
735
+ <module src="resource:net/xproc/xprocxq/src/xquery/std.xqm"
736
+ uri="http://xproc.net/xproc/std"/>
737
+ <module src="resource:net/xproc/xprocxq/src/xquery/ext.xqm"
738
+ uri="http://xproc.net/xproc/ext"/>
739
+ <module src="resource:net/xproc/xprocxq/src/xquery/opt.xqm"
740
+ uri="http://xproc.net/xproc/opt"/>
741
+ <module src="resource:net/xproc/xprocxq/src/xquery/naming.xqm"
742
+ uri="http://xproc.net/xproc/naming"/>
743
+
744
+ <!-- Optional Modules -->
745
+ <!--
746
+ <module class="org.exist.backup.xquery.BackupModule"
747
+ uri="http://exist-db.org/xquery/backups"/>
748
+
749
+ <module class="org.exist.xquery.modules.compression.CompressionModule"
750
+ uri="http://exist-db.org/xquery/compression" />
751
+ <module class="org.exist.xquery.modules.datetime.DateTimeModule"
752
+ uri="http://exist-db.org/xquery/datetime" />
753
+ <module class="org.exist.xquery.modules.file.FileModule"
754
+ uri="http://exist-db.org/xquery/file" />
755
+ <module class="org.exist.xquery.modules.example.ExampleModule"
756
+ uri="http://exist-db.org/xquery/examples" />
757
+ <module class="org.exist.xquery.modules.httpclient.HTTPClientModule"
758
+ uri="http://exist-db.org/xquery/httpclient" />
759
+ <module class="org.exist.xquery.modules.image.ImageModule"
760
+ uri="http://exist-db.org/xquery/image" />
761
+ <module class="org.exist.xquery.modules.jndi.JNDIModule"
762
+ uri="http://exist-db.org/xquery/jndi" />
763
+ <module class="org.exist.xquery.modules.mail.MailModule"
764
+ uri="http://exist-db.org/xquery/mail" />
765
+ <module class="org.exist.xquery.modules.math.MathModule"
766
+ uri="http://exist-db.org/xquery/math" />
767
+ <module class="org.exist.xquery.modules.scheduler.SchedulerModule"
768
+ uri="http://exist-db.org/xquery/scheduler" />
769
+ <module class="org.exist.xquery.modules.simpleql.SimpleQLModule"
770
+ uri="http://exist-db.org/xquery/simple-ql" />
771
+ <module class="org.exist.xquery.modules.sql.SQLModule"
772
+ uri="http://exist-db.org/xquery/sql" />
773
+ <module class="org.exist.xquery.modules.xslfo.XSLFOModule"
774
+ uri="http://exist-db.org/xquery/xslfo" />
775
+ <module class="org.exist.xquery.modules.xmldiff.XmlDiffModule"
776
+ uri="http://exist-db.org/xquery/xmldiff" />
777
+ <module class="org.exist.xquery.modules.cache.CacheModule"
778
+ uri="http://exist-db.org/xquery/cache" />
779
+
780
+ <module class="org.exist.xquery.modules.jfreechart.JFreeChartModule"
781
+ uri="http://exist-db.org/xquery/jfreechart"/>
782
+
783
+ <module class="org.exist.xquery.modules.svn.SVNModule"
784
+ uri="http://exist-db.org/xquery/svn"/>
785
+ <module class="org.exist.xquery.modules.metadata.MetadataModule"
786
+ uri="http://exist-db.org/xquery/metadata"/>
787
+
788
+ <module class="org.exist.xquery.modules.counter.CounterModule"
789
+ uri="http://exist-db.org/xquery/counter"/>
790
+ -->
791
+ </builtin-modules>
792
+ </xquery>
793
+
794
+ <!--
795
+ Inserting new nodes into a document can lead to fragmentation
796
+ in the DOM storage file.
797
+
798
+ - allowed-fragmentation:
799
+ defines the maximum number of page splits allowed within a document
800
+ before a defragmentation run will be triggered.
801
+
802
+ - enable-consistency-checks:
803
+ for debugging only. If the parameter is set to "yes", a consistency
804
+ check will be run on every modified document after every XUpdate
805
+ request. It checks if the persistent DOM is complete and all
806
+ pointers in the structural index point to valid storage addresses
807
+ containing valid nodes.
808
+
809
+ -->
810
+ <xupdate allowed-fragmentation="100" enable-consistency-checks="no"/>
811
+
812
+ </exist>