@NotThreadSafe public class PSXPathBoundSchema extends AbstractPSBoundSchema
| Constructor and Description |
|---|
PSXPathBoundSchema(IPSQueryBinding aQueryBinding,
PSSchema aOrigSchema,
String sPhase,
IPSErrorHandler aCustomErrorListener,
IPSValidationHandler aCustomValidationHandler,
IXPathConfig aXPathConfig)
Create a new bound schema.
|
| Modifier and Type | Method and Description |
|---|---|
PSXPathBoundSchema |
bind() |
String |
getValidationContext(String sRuleContext)
Get the validation context to be used.
|
XPathFunctionResolver |
getXPathFunctionResolver() |
XPathVariableResolver |
getXPathVariableResolver() |
String |
toString() |
void |
validate(Node aNode,
String sBaseURI,
IPSValidationHandler aValidationHandler)
The generic validation method.
|
createPartialValidationHandler, error, error, getAllRelevantPatterns, getCustomValidationHandler, getErrorHandler, getNamespaceContext, getOriginalSchema, getPhase, getPhaseID, getQueryBinding, isDefaultErrorHandler, isPhaseSpecified, validateComplete, validatePartially, warnpublic PSXPathBoundSchema(@Nonnull IPSQueryBinding aQueryBinding, @Nonnull PSSchema aOrigSchema, @Nullable String sPhase, @Nullable IPSErrorHandler aCustomErrorListener, @Nullable IPSValidationHandler aCustomValidationHandler, @Nullable IXPathConfig aXPathConfig) throws SchematronBindException
validate(Node, String, 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.aCustomValidationHandler - The custom PS validation handler. May be null.aXPathConfig - The XPath configuration to be used. May be null.SchematronBindException - In case XPath expressions are incorrect and pre-compilation fails@Nonnull public PSXPathBoundSchema bind() throws SchematronBindException
SchematronBindException@Nullable public XPathVariableResolver getXPathVariableResolver()
@Nullable public XPathFunctionResolver getXPathFunctionResolver()
@Nonnull public String getValidationContext(@Nonnull String sRuleContext)
IPSBoundSchemasRuleContext - The original rule context. May not be null.public void validate(@Nonnull Node aNode, @Nullable String sBaseURI, @Nonnull IPSValidationHandler aValidationHandler) throws SchematronValidationException
IPSBoundSchemaaNode - The node to be validated. May not be null.sBaseURI - Base URI of the XML to be validated. May be null.aValidationHandler - The validation handler that receives the callback informations. May
not be null.SchematronValidationException - In case a validation exception occurspublic String toString()
toString in class AbstractPSBoundSchemaCopyright © 2014–2020 Philip Helger. All rights reserved.