Database Reference
In-Depth Information
registry so that they may respond to incoming HTTP requests. By default this is
configured for the entire database by means of being present in the collection
configuration for
/db
. For further details, see
“Configuring RESTXQ” on page
216
.
Streaming Transformations for XML (STX)
STX
is an alternative mechanism to XSLT that was designed specifically for per‐
forming transformations on a stream of XML events.
The trigger
org.exist.collections.triggers.STXTransformerTrigger
allows
you to transform documents with
STX transformation sheets
when they are
stored or updated. For details of the STX transformation sheet language, see the
The STX transformer trigger relies on the
Joost
implementation of STX, so to use
STX you need to download Joost 0.9.1 and place the
joost.jar
file into
$EXIST_HOME/lib/user
before restarting eXist. The trigger takes a single param‐
eter,
src
, which points to your STX transformation sheet. This may be either a
path to a document in the database, or a URI from which the STX transforma‐
tion sheet can be downloaded.
For example, the collection configuration for the STX transformer trigger may
look like:
<collection
xmlns=
"http://;exist-db.org/collection-config/1.0"
>
<triggers>
<trigger
class=
"org.exist.collections.triggers.STXTransformerTrigger"
>
<parameter
name=
"src"
value=
"/db/my-transformation.stx"
/>
</trigger>
</triggers>
</collection>
Versioning
The resource versioning facility in eXist uses the trigger
org.exist.version
ing.VersioningTrigger
to support creating
diffs
of resources and tracking the
revision history of documents. See
“Versioning” on page 427
.
XQuery trigger
The XQuery trigger, while itself written in Java, acts as a bridge to XQuery and is
implemented in the
org.exist.collections.triggers.XQueryTrigger
class.
Upon receiving an event, it calls an appropriate function in a configured XQuery.
Its purpose is to allow developers to implement their own triggers in XQuery as
an easier alternative to Java. It is described in detail in
“XQuery Triggers” on
page 453
.
Triggers in eXist may be implemented in either XQuery or Java. Implementing the
triggers in XQuery is much simpler, but there are some operations that can currently
Search WWH ::
Custom Search