org.jopendocument.util
Class Validator.DTDValidator
java.lang.Object
org.jopendocument.util.Validator
org.jopendocument.util.Validator.DTDValidator
- Enclosing class:
- Validator
public static final class Validator.DTDValidator
- extends Validator
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 |
Validator.DTDValidator
public Validator.DTDValidator(org.jdom.Document doc)
Validator.DTDValidator
public Validator.DTDValidator(org.jdom.Document doc,
org.jdom.input.SAXBuilder b)
- Validate a document using its DTD.
- Parameters:
doc
- the document to validateb
- a builder which can resolve doc's DTD.
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].