@Immutable public class PSXPathBoundSchema extends AbstractPSBoundSchema
Constructor and Description |
---|
PSXPathBoundSchema(IPSQueryBinding aQueryBinding,
PSSchema aOrigSchema,
String sPhase,
IPSErrorHandler aCustomErrorListener,
XPathVariableResolver aXPathVariableResolver,
XPathFunctionResolver aXPathFunctionResolver)
Create a new bound schema.
|
Modifier and Type | Method and Description |
---|---|
PSXPathBoundSchema |
bind() |
static XPathFactory |
createXPathFactorySaxonFirst() |
String |
getValidationContext(String sRuleContext)
Get the validation context to be used.
|
XPathFunctionResolver |
getXPathFunctionResolver() |
XPathVariableResolver |
getXPathVariableResolver() |
String |
toString() |
void |
validate(Node aNode,
IPSValidationHandler aValidationHandler)
The generic validation method.
|
SchematronOutputType |
validateComplete(Node aNode)
Special validation that creates an SVRL document.
|
createPartialValidationHandler, error, error, getAllRelevantPatterns, getErrorHandler, getNamespaceContext, getOriginalSchema, getPhase, getPhaseID, getQueryBinding, isDefaultErrorHandler, isPhaseSpecified, validatePartially, warn
public PSXPathBoundSchema(@Nonnull IPSQueryBinding aQueryBinding, @Nonnull PSSchema aOrigSchema, @Nullable String sPhase, @Nullable IPSErrorHandler aCustomErrorListener, @Nullable XPathVariableResolver aXPathVariableResolver, @Nullable XPathFunctionResolver aXPathFunctionResolver) throws SchematronBindException
validate(Node, IPSValidationHandler)
method can be called many times without compiling the XPath statements
again and again.aQueryBinding
- The query binding to be used. May not be null
.aOrigSchema
- The original schema that should be bound. May not be
null
.sPhase
- The selected phase. May be null
indicating that the
default phase of the schema should be used (if present) or all
patterns should be evaluated if no default phase is present.aCustomErrorListener
- A custom error listener to be used. May be null
in
which case a
LoggingPSErrorHandler
is used internally.aXPathVariableResolver
- Custom XPath variable resolver. May be null
.aXPathFunctionResolver
- Custom XPath function resolver. May be null
.SchematronBindException
- In case XPath expressions are incorrect and pre-compilation fails@Nonnull public static XPathFactory createXPathFactorySaxonFirst() throws SchematronBindException
SchematronBindException
@Nonnull public PSXPathBoundSchema bind() throws SchematronBindException
SchematronBindException
@Nullable public XPathVariableResolver getXPathVariableResolver()
@Nullable public XPathFunctionResolver getXPathFunctionResolver()
@Nonnull public String getValidationContext(@Nonnull String sRuleContext)
IPSBoundSchema
sRuleContext
- The original rule context. May not be null
.public void validate(@Nonnull Node aNode, @Nonnull IPSValidationHandler aValidationHandler) throws SchematronValidationException
IPSBoundSchema
aNode
- The node to be validated. May not be null
.aValidationHandler
- The validation handler that receives the callback informations. May
not be null
.SchematronValidationException
- In case a validation exception occurs@Nonnull public SchematronOutputType validateComplete(@Nonnull Node aNode) throws SchematronValidationException
IPSBoundSchema
IPSBoundSchema.validate(Node, IPSValidationHandler)
.aNode
- The XML node to be validated. May not be null
.SchematronValidationException
- In case a validation exception occurspublic String toString()
toString
in class AbstractPSBoundSchema
Copyright © 2014–2017 Philip Helger. All rights reserved.