@NotThreadSafe public class PSXPathValidationHandlerSVRL extends PSValidationHandlerDefault
PSXPathBoundAssertReport
class is referenced!Constructor and Description |
---|
PSXPathValidationHandlerSVRL(IPSErrorHandler aErrorHandler)
Constructor
|
Modifier and Type | Method and Description |
---|---|
SchematronOutputType |
getSVRL() |
com.helger.commons.state.EContinue |
onFailedAssert(PSAssertReport aAssertReport,
String sTestExpression,
Node aRuleMatchingNode,
int nNodeIndex,
Object aContext)
This method is called for every failed assert.
|
void |
onPattern(PSPattern aPattern)
This method is called for every pattern inside the schema.
|
void |
onRule(PSRule aRule,
String sContext)
This method is called for every rule inside the current pattern.
|
void |
onStart(PSSchema aSchema,
PSPhase aActivePhase)
This is the first method called.
|
com.helger.commons.state.EContinue |
onSuccessfulReport(PSAssertReport aAssertReport,
String sTestExpression,
Node aRuleMatchingNode,
int nNodeIndex,
Object aContext)
This method is called for every failed assert.
|
onEnd
public PSXPathValidationHandlerSVRL(@Nonnull IPSErrorHandler aErrorHandler)
aErrorHandler
- The error handler to be used. May not be null
.public void onStart(@Nonnull PSSchema aSchema, @Nullable PSPhase aActivePhase) throws SchematronValidationException
IPSValidationHandler
onStart
in interface IPSValidationHandler
onStart
in class PSValidationHandlerDefault
aSchema
- The Schematron to be validated. Never null
.aActivePhase
- The selected phase, if any special phase was selected. May be
null
.SchematronValidationException
- In case of validation errorsIPSValidationHandler.onEnd(PSSchema, PSPhase)
public void onPattern(@Nonnull PSPattern aPattern)
IPSValidationHandler
onPattern
in interface IPSValidationHandler
onPattern
in class PSValidationHandlerDefault
aPattern
- The current pattern. Never null
.public void onRule(@Nonnull PSRule aRule, @Nonnull String sContext)
IPSValidationHandler
onRule
in interface IPSValidationHandler
onRule
in class PSValidationHandlerDefault
aRule
- The current rule. Never null
.sContext
- The real context to be used in validation. May differ from the
result of PSRule.getContext()
because of replaced variables
from <let> elements.@Nonnull public com.helger.commons.state.EContinue onFailedAssert(@Nonnull PSAssertReport aAssertReport, @Nonnull String sTestExpression, @Nonnull Node aRuleMatchingNode, int nNodeIndex, @Nullable Object aContext) throws SchematronValidationException
IPSValidationHandler
onFailedAssert
in interface IPSValidationHandler
onFailedAssert
in class PSValidationHandlerDefault
aAssertReport
- The current assert element. Never null
.sTestExpression
- The source XPath expression that was evaluated for this node. It may
be different from the test expression contained in the passed
assert/report element because of replaced <let> elements.
Never null
.aRuleMatchingNode
- The XML node of the document to be validated.nNodeIndex
- The index of the matched node, relative to the current rule.aContext
- A context object - implementation dependent. For the default query
binding this is e.g. an
PSXPathBoundAssertReport
object.EContinue.BREAK
to stop validating immediately.SchematronValidationException
- In case of validation errors@Nonnull public com.helger.commons.state.EContinue onSuccessfulReport(@Nonnull PSAssertReport aAssertReport, @Nonnull String sTestExpression, @Nonnull Node aRuleMatchingNode, int nNodeIndex, @Nullable Object aContext) throws SchematronValidationException
IPSValidationHandler
onSuccessfulReport
in interface IPSValidationHandler
onSuccessfulReport
in class PSValidationHandlerDefault
aAssertReport
- The current assert element. Never null
.sTestExpression
- The source XPath expression that was evaluated for this node. It may
be different from the test expression contained in the passed
assert/report element because of replaced <let> elements.
Never null
.aRuleMatchingNode
- The XML node of the document to be validated.nNodeIndex
- The index of the matched node, relative to the current rule.aContext
- A context object - implementation dependent. For the default query
binding this is e.g. an
PSXPathBoundAssertReport
object.EContinue.BREAK
to stop validating immediately.SchematronValidationException
- In case of validation errors@Nullable public SchematronOutputType getSVRL()
Copyright © 2014–2016 Philip Helger. All rights reserved.