Database Reference
In-Depth Information
• Mappings from system or public IDs to DTD grammar documents
• Mappings from namespaces to XML schema grammar documents
eXist works with v1.0 OASIS catalog files . For an example, have a look at the default
eXist catalog file in $EXIST_HOME/webapp/WEB-INF/catalog.xml .
Catalog files must be specified in the $EXIST_HOME/conf.xml file as in this example:
<validation mode= "no" >
<entity-resolver>
<catalog uri= "${WEBAPP_HOME}/WEB-INF/catalog.xml" />
<catalog uri= "xmldb:exist:///db/myapp/myapp-catalog.xml" />
</entity-resolver>
</validation>
All uri attributes must point to valid OASIS catalog files:
• By default, the catalogs are on the filesystem. Use an XMLDB URI (like in the
second catalog element in the preceding example) to specify a catalog that is
stored in the database.
• You can use ${EXIST_HOME} to point to $EXIST_HOME and ${WEBAPP_HOME} to
point to $EXIST_HOME/webapp .
Explicit Validation
Explicit validation allows you to perform validation from your code using the valida
tion extension module. eXist provides three different parsers for this:
JAXP
This parser (called JAXP because internally it uses the Java javax.xml.parsers
interface) validates documents using Xerces2 . XML schemas (v1.0) and DTDs
are supported through Xerces. Implicit validation uses the JAXP validator.
JAXV
This parser (called JAXV because internally it uses the Java java.xml.valida
tion interface) validates documents using the validation facility built into the
Java standard library. Only XML schemas are supported.
Jing
This validation is based upon James Clark's Jing parser . It supports XML
Schema, RELAX NG (both full and compact), Schematron (v1.5), and
Namespace-based Validation Dispatching Language (NVDL) .
This leaves you with the problem of which one to use. If you are unsure, the general
advice is to use JAXP for XML schema− and DTD-based validation and Jing for all
other types.
Search WWH ::




Custom Search