Database Reference
In-Depth Information
1. Either a beforeCreateDocument or a beforeUpdateDocument event is raised with
each document trigger configured on the target collection.
2. The validation phase begins. The parser begins parsing the XML document with
validation (if requested) and dispatches events as it moves through the
document.
3. If any document triggers are configured on the target collection, each of these
will receive the events from the parser in turn. This effectively allows the docu‐
ment triggers to interrupt the parse and hence fail the validation phase, which
will abort storing the document.
4. If the parse succeeded, the validation phase is complete. If the parse failed, the
process of storing the document is aborted and an error is reported.
5. The parser begins parsing the XML document and dispatches events as it moves
through the document.
6. If any document triggers are configured on the target collection, each of these
will receive the events from the parser in turn before they are then passed on to
the indexer . This effectively allows the document triggers to dynamically modify
the document should they wish.
7. The indexer receives the events from the parser (or document triggers, if config‐
ured) and performs a number of steps:
a. It extracts symbols from the event (e.g., the qualified name of an element) and
places them in the symbols table if they are not already present. The symbols
table file is $EXIST_HOME/webapp/WEB-INF/data/symbols.dbx .
b. For each node from the event, it substitutes names for symbols, and then
stores the node details into the persistent DOM . Elements and attributes are
placed into a B+-tree index, while other nodes are stored into pages in the per‐
sistent DOM. The B+-tree index maps nodes to their values located in the
pages. The persistent DOM file is $EXIST_HOME/webapp/WEB-INF/data/
dom.dbx .
c. It forwards each event to the index controller .
8. The index controller passes each event through an indexing pipeline . The index‐
ing pipeline always starts with the structural index (which is mandatory in eXist),
then follows any pluggable index modules that a user has configured on the target
collection (see “Configuring Indexes” on page 275 and “Configuring Full-Text
Indexes” on page 286 ). The structural index file is $EXIST_HOME/webapp/WEB-
INF/data/structure.dbx .
9. The target collection adds an entry for the newly stored XML document to itself
in the collection store . The collection store file is $EXIST_HOME/webapp/WEB-
INF/data/collections.dbx .
Search WWH ::




Custom Search