|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectdk.brics.xmlgraph.validator.Validator
public class Validator
Validator for XML graphs.
| Field Summary | |
|---|---|
static long |
time
Total number of millisecs used in this class. |
| Constructor Summary | |
|---|---|
Validator(ValidationErrorHandler e)
Constructs a new validator. |
|
| Method Summary | |
|---|---|
void |
validate(XMLGraph xg,
Grammar g)
Validates an XML graph relative to a Restricted RELAX NG schema. |
void |
validate(XMLGraph xg1,
XMLGraph xg2,
int xg2_root)
Validates an XML graph relative to another XML graph. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static long time
| Constructor Detail |
|---|
public Validator(ValidationErrorHandler e)
e - error handler| Method Detail |
|---|
public void validate(XMLGraph xg,
Grammar g)
throws ConverterException
XMLGraph.check(PrintStream))
and that the grammar is restricted (see Grammar.check(PrintStream)).
Note that this method works by first converting the schema into an XML graph - if the
schema is used for multiple validations, the schema should be pre-converted and the method
validate(XMLGraph,XMLGraph,int) should be used instead for better performance.
xg - XML graphg - schema
ConverterException - may be thrown if the schema is not restricted (see Grammar.check(PrintStream))
public void validate(XMLGraph xg1,
XMLGraph xg2,
int xg2_root)
XMLGraph.check(PrintStream))
and that the second XML graph has been constructed by RestrRelaxNG2XMLGraph.
Violations are reported to the error handler.
xg1 - first XML graph, assumed to be non-unknown (i.e. isUnknown returns false)xg2 - second XML graphxg2_root - if -1, then use the roots of xg2, otherwise use this node as override
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||