public interface Invalidity
extends javax.xml.transform.SourceLocator
Invalidity
is a validation error, that is, a failure of the instance document
to conform to the schema being used for validation.
The class extends SourceLocator
, which makes location information available (for example,
a line and column number). This information will generally be the location of the error as it appears
in error reports intended for a human reader. It is not necessarily the same as the location of the
invalid node. For example, if the schema type for element A does not allow a child element named B,
but in the instance document there is an A element with a B child, then the location information
may relate to element B, whereas it is A that is invalid.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConstraintClauseNumber()
Get the clause number of the rule that has been violated
|
java.lang.String |
getConstraintName()
Get the name of the constraint that has been violated
|
java.lang.String |
getConstraintReference()
Get the constraint name and clause in the format defined in XML Schema Part 1 Appendix C (Outcome Tabulations).
|
AbsolutePath |
getContextPath()
Get a hierarchic path giving the node being validated (the validation root).
|
java.lang.String |
getErrorCode()
Get the error code associated with the validity error.
|
NodeInfo |
getInvalidNode()
Get the node that was found to be invalid (if any).
|
java.lang.String |
getMessage()
Get the text of a message explaining what is wrong
|
AbsolutePath |
getPath()
Get a hierarchic path giving the logical position in the instance document where the
validation error was found
|
int |
getSchemaPart()
Get the part number of the XSD schema specification containing the constraint that
has been violated
|
int getSchemaPart()
java.lang.String getConstraintName()
java.lang.String getConstraintClauseNumber()
java.lang.String getConstraintReference()
NodeInfo getInvalidNode()
AbsolutePath getPath()
AbsolutePath getContextPath()
<xsl:copy-of select="X"
validation="strict"/>
; in XQuery it might be the target of a validate
expression.java.lang.String getMessage()
java.lang.String getErrorCode()
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.