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, Schema schema)
          Validate a document using JAXP.
 
Method Summary
 String isValid()
          Validate a document, stopping at the first problem.
 CollectionMap<String,String> validateCompletely()
          Validate the whole document.
 
Methods inherited from class org.jopendocument.util.Validator
getDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator.JAXPValidator

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

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

isValid

public 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<String,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].


Copyright © 2010 jOpenDocument All Rights Reserved.