Compile an XSL stylesheet.
Task package: | org.schmant.task.base |
Java package: | org.schmant.task.xml.xslt |
Category: | XML tasks |
Since: | 0.5 |
EntityFS-aware? | Yes* |
Implements: | ActionTaskFactory |
Produces: | Templates |
See also: | XsltTF |
Description:
Compile an XSL stylesheet. This task can be used to separate the stylesheet compilation step from the XSL transformation step when transforming several documents using the same stylesheet.
Required properties
Properties
attributes | top |
A list of TransformerFactory attributes. The attributes are set on the transformer factory in the order that they were added.
- Setter method:
clearAttributes()
Clear the list of attributes.- Setter method:
setAttribute(String name, Object value)
Set one attribute.parameters:name
– The attribute's name.value
– The attribute's value.- Setter method:
setAttributes(Object o)
Set one or several attributes.parameters:
features | top |
A collection of features for the
TransformerFactory
.
- Setter method:
clearFeatures()
Clear the map of features.- Setter method:
setFeature(String name, boolean value)
Set one feature.parameters:name
– The feature's name.value
– Is the feature enabled?- Setter method:
setFeatures(Map<String, Boolean> m)
Set a map of features.parameters:m
– The map of features.
logFooter | top |
The message that is logged to info
level
after the task has been successfully run.
- Setter method:
setLogFooter(String s)
parameters:s
– The footer message.- Default value:
- Empty (no footer message is logged.)
- See also:
- logHeader
logHeader | top |
The message that is logged to info
level
before the task is run.
- Setter method:
setLogHeader(String s)
parameters:s
– The header message.- Default value:
- A task class specific message.
- See also:
- logFooter
reportLevel | top |
This property is used to change the Report level for all task created by this task factory. The report level is changed for the thread running the task when the it is run, and is restored to its previous level when the it is done.
- Setter method:
setReportLevel(Level l)
Set the report levelparameters:l
– The new report level.
traceLogging | top |
If trace logging is enabled for a task, it reports its configuration before it is run.
Trace logging may also be enabled globally for all tasks by calling TraceMode.setTraceMode(boolean).
- Setter method:
setTraceLogging(boolean b)
Enable or disable trace logging.parameters:b
– Enable trace logging?
transformerFactoryClassName | top |
The fully qualified name of the
TransformerFactory
to use for creating the
Transformer
for the XSL
transformation.
- Setter method:
setTransformerFactoryClassName(String s)
parameters:- Default value:
- The current default transformer factory. This is often Java's own implementation, but it may also be an implementation that have been selected by a service definition in a Jar on the classpath. (Schmant's classpath and Jar files from all enabled task packages.)
xslUriResolver | top |
A URIResolver that is used to resolve external entities in the stylesheet. This can for instance be a XmlCatalogResolver.
- Setter method:
setXslUriResolver(URIResolver r)
parameters:r
– The URI resolver- See also:
- xslUriResolverDecorator
xslUriResolverDecorator | top |
An optional UriResolverDecorator that the XSL compiler uses to resolve external entities for the stylesheet.
- Setter method:
setXslUriResolverDecorator(UriResolverDecorator d)
parameters:d
– The URI resolver decorator.- See also:
- xslUriResolver
Examples
See XsltTF examples.* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.