Database Reference
In-Depth Information
Controlling implicit validation
To turn implicit validation on or off for the full database, you have to edit the
$EXIST_HOME/conf.xml configuration file (and restart eXist afterward). Search for
the following fragment:
<validation mode= "no" >
<entity-resolver>
<catalog uri= "..." />
</entity-resolver>
</validation>
The mode attribute determines whether implicit validation is on or off. It can have
one of the following three values:
no
Implicit validation is off.
yes
Implicit validation is on. All XML documents are validated and rejected if they
do not pass. If an appropriate XML schema or DTD cannot be found (see “Speci‐
fying catalogs for implicit validation” on page 247 ), the document is rejected also.
auto Implicit validation is applied only when an appropriate XML schema or DTD
can be found. Otherwise, the document is accepted.
To tune implicit validation for a specific collection (and its subcollections), you have
to do the following:
1. The database has a system collection, /db/system/config . Repeat the database col‐
lection structure here, leading up to the collection for which you want to specify
the implicit validation. So, when you want to turn on implicit validation for /db/
myapp/data , create the collection /db/system/config/db/myapp/data .
2. Create an XML file here called collection.xconf with the following contents:
<collection xmlns= "http://exist-db.org/collection-config/1.0" >
<validation mode= "..." />
</collection>
3. Fill in the appropriate value for the mode attribute, as described earlier.
Specifying catalogs for implicit validation
The validation element in the $EXIST_HOME/conf.xml file also contains the URIs
of the catalog files that eXist uses for implicitly validating documents. A catalog file
specifies:
Search WWH ::




Custom Search