public class InSituValidator
extends java.lang.Object
Note that if validation fails, the tree will not be in a usable state. For this reason it may be desirable to do the validation twice, once with a Sink as the destination, and only use the in-situ validation once it is known that it will succeed.
Constructor and Description |
---|
InSituValidator(MutableNodeInfo root,
int validationMode)
Create an InSituValidator
|
Modifier and Type | Method and Description |
---|---|
void |
validate()
Perform the validation
|
public InSituValidator(MutableNodeInfo root, int validationMode)
root
- the root node of the tree to be validated. This must be a document or element node,
and it must be an updateable nodevalidationMode
- the validation mode: Validation.STRICT
or Validation.LAX
public void validate() throws XPathException
XPathException
- if it is not possible to construct a validator, or if validation fails.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.