org.jopendocument.util
Class Validator.JAXPValidator

java.lang.Object
  extended by org.jopendocument.util.Validator
      extended by org.jopendocument.util.Validator.JAXPValidator
Enclosing class:
Validator

public static final class Validator.JAXPValidator
extends Validator


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jopendocument.util.Validator
Validator.DTDValidator, Validator.JAXPValidator
 
Constructor Summary
Validator.JAXPValidator(org.jdom.Document doc, javax.xml.validation.Schema schema)
          Validate a document using JAXP.
 
Method Summary
 java.lang.String isValid()
          Validate a document, stopping at the first problem.
 CollectionMap<java.lang.String,java.lang.String> validateCompletely()
          Validate the whole document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator.JAXPValidator

public Validator.JAXPValidator(org.jdom.Document doc,
                               javax.xml.validation.Schema schema)
Validate a document using JAXP.

Parameters:
doc - the document to validate
schema - the schema.
Method Detail

isValid

public java.lang.String isValid()
Description copied from class: Validator
Validate a document, stopping at the first problem.

Specified by:
isValid in class Validator
Returns:
null if doc is valid, a String describing the first problem otherwise.

validateCompletely

public CollectionMap<java.lang.String,java.lang.String> validateCompletely()
Description copied from class: Validator
Validate the whole document.

Specified by:
validateCompletely in class Validator
Returns:
all problems (with line number) indexed by type, e.g. ERROR unexpected attribute "style:join-border" => [on line 22:50, on line 14901:290].