org.exist.validation
Class Validator

java.lang.Object
  extended byorg.exist.validation.Validator

public class Validator
extends java.lang.Object

Validate XML documents with their grammars (DTD's and Schemas).

Author:
dizzzz

Field Summary
static java.lang.String XERCESVERSION
           
 
Constructor Summary
Validator(BrokerPool pool)
          Setup Validator object with brokerpool as centre.
 
Method Summary
 DatabaseResources getDatabaseResources()
          Get access to internal DatabaseResources.
 GrammarPool getGrammarPool()
          Get access to internal GrammarPool.
 ValidationReport validate(java.io.InputStream is)
          Validate XML data in inputstream.
 ValidationReport validate(java.io.InputStream is, java.lang.String grammarPath)
          Validate XML data in inputstream.
 ValidationReport validate(java.io.Reader reader)
          Validate XML data from reader.
 ValidationReport validate(java.io.Reader reader, java.lang.String grammarPath)
          Validate XML data from reader using specified grammar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XERCESVERSION

public static final java.lang.String XERCESVERSION
See Also:
Constant Field Values
Constructor Detail

Validator

public Validator(BrokerPool pool)
Setup Validator object with brokerpool as centre.

Method Detail

validate

public ValidationReport validate(java.io.InputStream is)
Validate XML data in inputstream.

Parameters:
is - XML input stream.
Returns:
Validation report containing all validation info.

validate

public ValidationReport validate(java.io.InputStream is,
                                 java.lang.String grammarPath)
Validate XML data in inputstream.

Parameters:
is - XML input stream.
Returns:
Validation report containing all validation info.

validate

public ValidationReport validate(java.io.Reader reader)
Validate XML data from reader.

Parameters:
reader - XML input
Returns:
Validation report containing all validation info.

validate

public ValidationReport validate(java.io.Reader reader,
                                 java.lang.String grammarPath)
Validate XML data from reader using specified grammar. grammar path null : search all documents starting in /db /db/doc/ : start search start in specified collection /db/doc/schema/schema.xsd :start with this schema, no search needed.

Parameters:
grammarPath - User supplied path to grammar.
reader - XML input.
Returns:
Validation report containing all validation info.

getDatabaseResources

public DatabaseResources getDatabaseResources()
Get access to internal DatabaseResources.

Returns:
Internally used DatabaseResources.

getGrammarPool

public GrammarPool getGrammarPool()
Get access to internal GrammarPool.

Returns:
Internally used GrammarPool.


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.