public interface IPSValidationHandler
IPSBoundSchema.validate(Node,
IPSValidationHandler)
Modifier and Type | Method and Description |
---|---|
void |
onEnd(PSSchema aSchema,
PSPhase aActivePhase)
This is the last method called.
|
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.
|
void onStart(@Nonnull PSSchema aSchema, @Nullable PSPhase aActivePhase) throws SchematronValidationException
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 errorsonEnd(PSSchema, PSPhase)
void onPattern(@Nonnull PSPattern aPattern) throws SchematronValidationException
aPattern
- The current pattern. Never null
.SchematronValidationException
- In case of validation errorsvoid onRule(@Nonnull PSRule aRule, @Nonnull String sContext) throws SchematronValidationException
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.SchematronValidationException
- In case of validation errors@Nonnull com.helger.commons.state.EContinue onFailedAssert(@Nonnull PSAssertReport aAssertReport, @Nonnull String sTestExpression, @Nonnull Node aRuleMatchingNode, int nNodeIndex, @Nullable Object aContext) throws SchematronValidationException
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 com.helger.commons.state.EContinue onSuccessfulReport(@Nonnull PSAssertReport aAssertReport, @Nonnull String sTestExpression, @Nonnull Node aRuleMatchingNode, int nNodeIndex, @Nullable Object aContext) throws SchematronValidationException
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 errorsvoid onEnd(@Nonnull PSSchema aSchema, @Nullable PSPhase aActivePhase) throws SchematronValidationException
aSchema
- The Schematron that was be validated. Never null
.aActivePhase
- The selected phase, if any special phase was selected. May be
null
.SchematronValidationException
- In case of validation errorsonStart(PSSchema, PSPhase)
Copyright © 2014–2017 Philip Helger. All rights reserved.