Interface XProcTransformerInterface
public interface XProcTransformerInterface
Interface for XProc engines used for transformation and/or validation...
-
Method Summary
Modifier and TypeMethodDescriptionGet the last transformation messages.void
initialize
(String pipelineURI, String uriResolverClassName, String entityResolverClassName) Initialize the transformer with the URI of the pipeline, the uri resolver and the entity resolver.void
Set the Saxon configuration customizer.boolean
Check if the current engine supports validation.transform
(XProcInputPort[] inputPortsMapping, XProcOutputPort[] outputPortsMapping, XProcOption[] options, XProcParametersPort[] parameters) Transform the XProc file.validate()
Validate the current pipeline.
-
Method Details
-
initialize
Initialize the transformer with the URI of the pipeline, the uri resolver and the entity resolver.- Parameters:
pipelineURI
- The pipeline URI.uriResolverClassName
- The class name. It must be an implementation ofjavax.xml.transform.URIResolver
entityResolverClassName
- The class name. It must be an implementation oforg.xml.sax.EntityResolver
.
-
setSaxonConfigurationCustomizer
Set the Saxon configuration customizer.- Parameters:
customizer
- The Saxon configuration customizer.
-
supportsValidation
boolean supportsValidation()Check if the current engine supports validation.- Returns:
true
if validation is supported,false
otherwise.
-
validate
List<DocumentPositionedInfo> validate()Validate the current pipeline.- Returns:
- The list of errors and warnings if any...
-
transform
Map<String,List<ResultItem>> transform(XProcInputPort[] inputPortsMapping, XProcOutputPort[] outputPortsMapping, XProcOption[] options, XProcParametersPort[] parameters) throws Exception Transform the XProc file.- Parameters:
inputPortsMapping
- The input port mappings.outputPortsMapping
- The output port mappings.options
- The options.parameters
- The parameters.- Returns:
- A map with output port names as keys, and their content as a list of ResultItem.
- Throws:
Exception
-
getLastTransformationMessages
List<DocumentPositionedInfo> getLastTransformationMessages()Get the last transformation messages.- Returns:
- The list with the last transformation messages.
-