Transformation API for XML (TrAX) is a generic Java API for performing a transformation from source to a result. See the links below for more details:
This document describes a simple TrAX-like Perl API that has been developed for purposes of XML::STX transformation engine.
General rules and conventions: There are no set/get methods to access to properties. All properties can be passed to new() and set directly in the object. Objects and properties are all mixed case with initial upper-case. Method names have been converted to lower-case with underscores.
A factory for Templates objects, a direct factory for Transformer objects. Can also serve as factory for other objects (e.g. SAXSource, SAXResult). This class is used as a base class for the processor.
METHODS:
Returns a new instance of Templates. The source can also be provided as InputSource or uri, which is turned into SAXSource object automatically using a default XML reader.
Returns a new instance of Transformer. The source can also be provided as InputSource or uri, which is turned into SAXSource object automatically using a default XML reader.
This is a shortcut method that provides a default transformation context for a Templates object directly.
Returns a new instance of SAXSource. The second argument is optional; an instance of XML reader is created automatically if it's missing.
Returns a new instance of SAXResult. The argument is optional; an instance of handler is created automatically if it's missing.
PROPERTIES:
Error listener that is in use when parsing templates.
URI resolver that is in use when parsing templates.
A runtime representation of the transformation instructions. A data bag for transformation instructions; act as a factory for Transformers.
Returns a new instance of Transformer.
An execution context for transformations, it serves as an interface for performing the transformation.
Performs the transformation. The source can also be provided as InputSource or uri, which is turned into SAXSource object automatically using a default XML reader. The second argument is optional; an instance of SAXResult is created automatically if it's missing.
Clears all parameters set for this transformer.
Parameters is a hash keyed by parameter names in JClark's namespace notation. The keys are of the form {NamespaceURI}LocalName. If a parameter has no NamespaceURI, then it is simply LocalName. Values of the hash are scalar values of parameters.
{NamespaceURI}LocalName
LocalName
Error listener that is in use during the transformation.
URI resolver that is in use during the transformation.
A data holder for SAX input streams.
This object implements an interface called Source representing multiple types of input. Other implementations include DOMSource and StreamSource, none of them implemented by XML::STX.
System identifier for the source (optional).
XML reader for the source.
SAX InputSource for the source.
A data holder for SAX output streams.
This object implements an interface called Result representing multiple types of output. Other implementations include DOMResult and StreamResult, none of them implemented by XML::STX.
System identifier for the result (optional).
Content handler for the result.
An object that can be called by the processor to turn URIs used in transformations into SAXSource objects.
Parameters are URI to be resolved and optional base URI. The function returns a SAXSource object or undef if the URI cannot be resolved.
Sources is a hash keyed by URIs. Values of the hash are SAXSource objects. These URI-Source pairs are used when trying to resolve an input URI before standard resolution mechanisms take place.
Results is a hash keyed by URIs. Values of the hash are SAXResult objects. These URI-Result pairs are used when trying to resolve an output URI before standard resolution mechanisms take place.
This interface is used by TransformerFactory and Transformer to report all errors and warnings. The ErrorListener property of these objects is used to register an instance of this object.
Receives notification of a warning.
Receives notification of a recoverable error.
Receives notification of a non-recoverable error.
An implementation of Parser interface.
The default XML reader is chosen from compliant SAX2 parsers installed in system; XML::SAX::PurePerl being the fall-back.
A hash representing input source.
A content handler.
The default handler is chosen from compliant SAX2 writers installed in system; XML::STX::Writer being the fall-back.
A (blessed) hash representing a Perl exception.
$Id: TrAXref.pod,v 1.9 2003/05/29 08:42:04 cvspetr Exp $
To install XML::STX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::STX
CPAN shell
perl -MCPAN -e shell install XML::STX
For more information on module installation, please visit the detailed CPAN module installation guide.