Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 46 additions & 6 deletions src/main/xar-resources/data/configuration/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink">
<info>
<title>Application Server Configuration</title>
<date>2Q21</date>
<date>4Q25</date>
<keywordset>
<keyword>operations</keyword>
</keywordset>
Expand Down Expand Up @@ -819,11 +819,51 @@
<sect2 xml:id="validations">
<title> <tag>validation</tag> element </title>

<para>Defines the default validation settings active when parsing XML and links to
catalog files. Catalog files are used to locate DTDs, schemas and resolve external
entities in general.</para>
<para>Please refer to the corresponding documentation on <link
xlink:href="validation">XML Validation</link>.</para>
<para>This section allows to configure the validation settings of the XML parser when an XML document is inserted into the database,
the location of the catalog files and the characteristics of the grammar cache.</para>

<programlisting language="xml" xlink:href="listings/listing-11.xml"/>

<para>The validation mode and the catalog <tag>entity-resolver</tag> items are discussed in the separate
document <link xlink:href="validation">XML Validation</link>.</para>

<para>The <tag>grammar-cache</tag> (added in eXist-db v7.0) configures the properties of the XML parser grammar cache. The cache contains
compiled versions of XSD and DTD grammar files that are generated by the XML parser when the XML parser is set in validating mode.
Re-use of these compiled versions can accellerate the validation process significantly.
</para>
<para>
The following items can be configured:
</para>
<sect3 xml:id="grammar-cache-att">
<title> <tag>grammar-cache</tag> attributes</title>

<variablelist>
<varlistentry>
<term> <code>size</code> </term>
<listitem>
<para>Specifies the maximum number of entries the cache may contain. The following values can be used: </para>
<itemizedlist>
<listitem>
<para> <code> 0</code>: grammars will be evicted immediately after being loaded into the cache.</para>
</listitem>
<listitem>
<para> <code>-1</code>: no maximum for the number of cached grammars.</para>
</listitem>
</itemizedlist>


</listitem>
</varlistentry>
<varlistentry>
<term> <code>expire</code> </term>
<listitem>
<para>The time (in seconds) after which an unused grammar should expire and be removed
from the grammar pool. For value <literal>-1</literal> grammars will not be removed over time.</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>

</sect2>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<validation mode="no">
<entity-resolver>
<catalog uri="${WEBAPP_HOME}/WEB-INF/catalog.xml"/>
</entity-resolver>
<grammar-cache size="500" expire="3600"/>
</validation>
4 changes: 2 additions & 2 deletions src/main/xar-resources/data/validation/validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink">
<info>
<title>XML Validation</title>
<date>2Q19</date>
<date>4Q25</date>
<keywordset>
<keyword>application-development</keyword>
<keyword>testing</keyword>
Expand All @@ -18,7 +18,7 @@
<para>There are two ways to validate documents: </para>
<itemizedlist>
<listitem>
<para> <xref linkend="sect-implicit-validation"/>happens automatically when
<para> <xref linkend="sect-implicit-validation"/> happens automatically when
inserting documents into the database.</para>
</listitem>
<listitem>
Expand Down