Saxon.Api
Class ValidationFailure
-
public class ValidationFailure
This exception indicates a failure when validating an instance against a type defined in a schema.
This class holds the same information as a ValidationException
, except that it is not an exception,
and does not carry system overheads such as a stack trace. It is used because operations
such as "castable",
and validation of values in a union, cause validation failures on a success path and
it is costly to throw,
or even to create, exception objects on a success path.
Method Summary |
|
---|---|
int | GetColumnNumber() Return the character position where the current document event ends. |
string | GetConstraintClauseNumber() Get the constraint clause number. |
string | GetConstraintName() Get the constraint name. |
string | getConstraintReference() Get the constraint name and clause in the format defined in XML Schema Part C (Outcome Tabulations). This mandates the format validation-rule-name.clause-number |
string | GetContextPath() Get additional location text, if any. |
string | GetErrorCode() Get the error code associated with the validity error. This is relevant only when validation is run from within XSLT or XQuery, which define different error codes for validation errors. |
int | GetLineNumber() Return the line number where the current document event ends. |
string | GetMessage() Get the text of a message explaining what is wrong. |
string | GetPath() Get a hierarchic path giving the logical position in the instance document where the validation error was found. |
string | GetPublicId() Return the public identifier for the current document event. |
int | GetSchemaPart() Get the "schema part" component of the constraint reference. |
string | GetSystemId() Return the system identifier for the current document event. |
Method Detail
GetColumnNumber
GetConstraintClauseNumber
Get the constraint clause number.
Returns:
GetConstraintName
Get the constraint name.
Returns:
getConstraintReference
Get the constraint name and clause in the format defined in XML Schema Part C (Outcome Tabulations). This mandates the format validation-rule-name.clause-number
Returns:
GetContextPath
Get additional location text, if any.
Returns:
GetErrorCode
Get the error code associated with the validity error. This is relevant only when validation is run from within XSLT or XQuery, which define different error codes for validation errors.
Returns:
GetLineNumber
Return the line number where the current document event ends.
Returns:
GetMessage
Get the text of a message explaining what is wrong.
Returns:
GetPath
Get a hierarchic path giving the logical position in the instance document where the validation error was found.
Returns:
GetPublicId
Return the public identifier for the current document event.
Returns:
GetSchemaPart
Get the "schema part" component of the constraint reference.
Returns:
GetSystemId
Return the system identifier for the current document event.
Returns:
Return the character position where the current document event ends.
Returns: