eu.peppol.validation.commons.schematron.xslt
Class AbstractSchematronXSLTResource
java.lang.Object
eu.peppol.validation.commons.schematron.AbstractSchematronResource
eu.peppol.validation.commons.schematron.xslt.AbstractSchematronXSLTResource
- All Implemented Interfaces:
- com.phloc.commons.id.IHasID<String>, ISchematronResource
- Direct Known Subclasses:
- SchematronResourceSCH, SchematronResourceXSLT
public abstract class AbstractSchematronXSLTResource
- extends AbstractSchematronResource
Abstract implementation of a Schematron resource that is based on XSLT
transformations.
- Author:
- PEPPOL.AT, BRZ, Philip Helger
AbstractSchematronXSLTResource
public AbstractSchematronXSLTResource(@Nonnull
com.phloc.commons.io.IReadableResource aSCHResource,
@Nullable
ErrorListener aCustomErrorListener,
@Nullable
URIResolver aCustomURIResolver,
@Nullable
ISchematronXSLTProvider aXSLTProvider)
isValidSchematron
public final boolean isValidSchematron()
- Returns:
true
if this Schematron can be used to validate XML
instances. If not, the Schematron is invalid and the log files must
be investigated.
applySchematronValidation
@Nullable
public final Document applySchematronValidation(@Nonnull
Source aXMLSource)
throws Exception
- Description copied from interface:
ISchematronResource
- Apply the schematron validation on the passed XML source and return an SVRL
XML document.
- Parameters:
aXMLSource
- The XML source to validate via Schematron. May not be
null
.
- Returns:
- The SVRL XML document containing the result. May be
null
when interpreting the Schematron failed.
- Throws:
Exception
- In case the transformation somehow goes wrong.- See Also:
on how to convert the document
into a domain object
toString
public String toString()
- Overrides:
toString
in class AbstractSchematronResource
Copyright © 2011 PEPPOL project. All Rights Reserved.