A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/683.html
Document ID: 683
Branch: main
Language: default
Name: Validation (unchanged)
Document Type: Document (unchanged)
Updated on: 9/13/05 9:52:56 PM
Updated by: Pier Fumagalli
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 9202 bytes (previous version: 7367 bytes)
Content diff:
(183 equal lines skipped)
<p>In other words, the grammar identifier can be prefixed by the schema
parser
name declared in <tt>cocoon.xconf</tt> separated by the colon character.</p>
+++ <h1>The <tt>ValidationHandler</tt> interface</h1>
+++
+++ <p>The <tt>ValidationHandler</tt> interface is a simple union of the
+++ <tt>ContentHandler</tt> and <tt>LexicalHandler</tt> SAX interfaces.</p>
+++
+++ <p>To validate documents, simply, send SAX events to the
+++ <tt>ValidationHandler</tt>: the <tt>ErrorHandler</tt> originally specified
when
+++ obtaining it will receive notification of all inconsistancies, optionally
+++ throwing <tt>SAXException</tt>s back to the caller.</p>
+++
+++ <p>In addition to this the <tt>ValidationHandler</tt> provides an extra
method
+++ called <tt>getValidity()</tt>. This method exposes a <tt>SourceValidity</tt>
+++ instance associated with the original schema (and possibly all included
+++ subschemas) previously parsed. This is extremely useful when dealing with
+++ pipeline caches, as it allows to identify whether the behavior of the
+++ <tt>ValidationHandler</tt> will change in result to schema changes.</p>
+++
+++ <h1>Extensions implementation details</h1>
+++
+++ <p>For normal development (extending the validation framework with new
grammars)
+++ developers should implement the <tt>SchemaParser</tt> and <tt>Schema</tt>
+++ interfaces. A number of different abstract classes are provided in the
+++ <tt>org.apache.cocoon.components.validation.impl</tt> package.</p>
+++
+++ <p>The sources of other provided <tt>SchemaParser</tt> implementations and
the
+++ <tt>JavaDoc</tt> comments can be of extreme help when developing new
providers.
+++ </p>
+++
+++ <p>Alternatively, one can provide implementations against the JAXP API, and
+++ Cocoon can use those directly through the configuration of the
+++ <tt>JaxpSchemaParser</tt> class. More than one <tt>JaxpSchemaParser</tt>
can be
+++ configured for a <tt>Validator</tt> in the <tt>cocoon.xconf</tt> file, just
+++ specify a different factory class, and optionally the grammar languages this
+++ provides (see the JavaDOC for more information).</p>
+++
</body>
</html>
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
no changes