trax
Base "TRAX" API for XSLT transformers.
This API borrows many structural notions from SAX,
such as the way error handling and external entity
resolution are handled, although it does not reuse
the corresponding SAX classes.
To use XSLT transformers:
- Start with TransformerFactory.newInstance();
- Then you may wish to configure that factory through
its features and properties. This includes modifying
the way errors are handled and URIs are resolved.
- Then you have several options for how to perform
the XSLT transformations. One generic option is to ask the
factory for a Transformer
and then use Transformer.transform() to pull
input text onto output text.
- Alternatively, most factories support flexible integration
with SAX event streams. You can cast such factories to a
SAXTransformerFactory
and perform either push or pull mode transformations.
The OutputKeys class
holds constants that can be used to configure output
properties used with Result objects, as if
they were specified in xslt:output attributes
in the stylesheet specifying the transform.
The Templates class
accomodates the notion of "compiled" transforms.