@Immutable public final class SchematronHelper extends Object
Modifier and Type | Method and Description |
---|---|
static SchematronOutputType |
applySchematron(ISchematronResource aSchematron,
com.helger.commons.io.resource.IReadableResource aXML)
Apply the passed schematron on the passed XML resource using a custom error
handler.
|
static SchematronOutputType |
applySchematron(ISchematronResource aSchematron,
Node aNode)
Apply the passed schematron on the passed XML node.
|
static SchematronOutputType |
applySchematron(ISchematronResource aSchematron,
Source aXML)
Apply the passed schematron on the passed XML resource.
|
static com.helger.commons.error.IResourceErrorGroup |
convertToResourceErrorGroup(SchematronOutputType aSchematronOutput,
String sResourceName)
Convert a
SchematronOutputType to an IResourceErrorGroup . |
static com.helger.commons.microdom.IMicroDocument |
getWithResolvedSchematronIncludes(com.helger.commons.io.resource.IReadableResource aResource)
Resolve all Schematron includes of the passed resource.
|
static com.helger.commons.microdom.IMicroDocument |
getWithResolvedSchematronIncludes(com.helger.commons.io.resource.IReadableResource aResource,
com.helger.commons.xml.serialize.read.ISAXReaderSettings aSettings)
Deprecated.
|
static com.helger.commons.microdom.IMicroDocument |
getWithResolvedSchematronIncludes(com.helger.commons.io.resource.IReadableResource aResource,
com.helger.commons.xml.serialize.read.ISAXReaderSettings aSettings,
IPSErrorHandler aErrorHandler)
Resolve all Schematron includes of the passed resource.
|
@Nullable public static SchematronOutputType applySchematron(@Nonnull ISchematronResource aSchematron, @Nonnull com.helger.commons.io.resource.IReadableResource aXML)
aSchematron
- The Schematron resource. May not be null
.aXML
- The XML resource. May not be null
.null
if either the Schematron or the XML could not be
read.IllegalStateException
- if the processing throws an unexpected exception.@Nullable public static SchematronOutputType applySchematron(@Nonnull ISchematronResource aSchematron, @Nonnull Source aXML)
aSchematron
- The Schematron resource. May not be null
.aXML
- The XML resource. May not be null
.null
if either the Schematron or the XML could not be
read.IllegalStateException
- if the processing throws an unexpected exception.@Nullable public static SchematronOutputType applySchematron(@Nonnull ISchematronResource aSchematron, @Nonnull Node aNode)
aSchematron
- The Schematron resource. May not be null
.aNode
- The XML node. May not be null
.null
if either the Schematron or the XML could not be
read.IllegalStateException
- if the processing throws an unexpected exception.@Nonnull public static com.helger.commons.error.IResourceErrorGroup convertToResourceErrorGroup(@Nonnull SchematronOutputType aSchematronOutput, @Nullable String sResourceName)
SchematronOutputType
to an IResourceErrorGroup
.aSchematronOutput
- The result of Schematron validationsResourceName
- The name of the resource that was validated (may be a file path
etc.)null
error list of SVRLResourceError
objects.@Nullable public static com.helger.commons.microdom.IMicroDocument getWithResolvedSchematronIncludes(@Nonnull com.helger.commons.io.resource.IReadableResource aResource)
aResource
- The Schematron resource to read. May not be null
.null
if the passed resource could not be read as XML
document@Nullable @Deprecated public static com.helger.commons.microdom.IMicroDocument getWithResolvedSchematronIncludes(@Nonnull com.helger.commons.io.resource.IReadableResource aResource, @Nullable com.helger.commons.xml.serialize.read.ISAXReaderSettings aSettings)
aResource
- The Schematron resource to read. May not be null
.aSettings
- The SAX reader settings to be used. May be null
to use
the default settings.null
if the passed resource could not be read as XML
document@Nullable public static com.helger.commons.microdom.IMicroDocument getWithResolvedSchematronIncludes(@Nonnull com.helger.commons.io.resource.IReadableResource aResource, @Nullable com.helger.commons.xml.serialize.read.ISAXReaderSettings aSettings, @Nonnull IPSErrorHandler aErrorHandler)
aResource
- The Schematron resource to read. May not be null
.aSettings
- The SAX reader settings to be used. May be null
to use
the default settings.aErrorHandler
- The error handler to be used. May not be null
.null
if the passed resource could not be read as XML
documentCopyright © 2014–2015 Philip Helger. All rights reserved.