Modifier and Type | Class and Description |
---|---|
pack-priv static class | TransformerImpl.
This class wraps an ErrorListener into a MessageHandler in order to capture messages reported via xsl:message. |
Modifier and Type | Field and Description |
---|---|
private String | _accessExternalDTD
protocols allowed for external DTD references in source file and/or stylesheet. |
pack-priv CatalogFeatures | |
pack-priv CatalogResolver | |
pack-priv int | |
private final ErrorListener | _defaultListener
Default error listener |
private DOM | _dom
A reference to a internal DOM representation of the input. |
private XSLTCDTMManager | _dtmManager
A reference to the XSLTCDTMManager which is used to build the DOM/DTM for this transformer. |
private String | _encoding
The output encoding of this transformation. |
private ErrorListener | _errorListener
An error listener for runtime errors. |
private int | _indentNumber
Number of indent spaces to add when indentation is on. |
private boolean | _isIdentity
A flag indicating whether this transformer implements the identity transform. |
private boolean | _isSecureProcessing
State of the secure processing feature. |
private String | _method
The output method of this transformation. |
private OutputStream | _ostream
A reference to the output stream, if we create one in our code. |
private boolean | _overrideDefaultParser
Indicates whether 3rd party parser may be used to override the system-default |
private Map | _parameters
A map to store parameters for the identity transform. |
private Properties | _properties
Output properties of this transformer instance. |
private Properties | _propertiesClone
Output properties of this transformer instance. |
private XMLReaderManager | _readerManager
A reference to an object that creates and caches XMLReader objects. |
protected XMLSecurityManager | |
private String | _sourceSystemId
The systemId set in input source. |
private TransformerFactoryImpl | _tfactory
A reference to the transformer factory that this templates object belongs to. |
private TransletOutputHandlerFactory | _tohFactory
A reference to an output handler factory. |
private AbstractTranslet | _translet
A reference to the translet or null if the identity transform. |
private URIResolver | _uriResolver
A reference to a URI resolver for calls to document(). |
pack-priv boolean | |
pack-priv JdkProperty | |
private static final String | |
private static final String | NAMESPACE_PREFIXES_FEATURE
Namespace prefixes feature for |
Access | Constructor and Description |
---|---|
protected | |
protected | TransformerImpl(Translet translet, Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory)
|
Modifier and Type | Method and Description |
---|---|
public void | clearParameters()
Implements abstract javax. Implements JAXP's Transformer.clearParameters() Clear all parameters set with setParameter. |
private Properties | createOutputProperties(Properties outputProperties)
Internal method to create the initial set of properties. |
private DOM | |
public ErrorListener | Returns: The error event handler currently in effectImplements abstract javax. Implements JAXP's Transformer.getErrorListener() Get the error event handler in effect for the transformation. |
public SerializationHandler | getOutputHandler(Result result)
Create an output handler for the transformation output based on the type and contents of the TrAX Result object passed to the transform() method. |
public Properties | Returns: Properties in effect for this TransformerImplements abstract javax. Implements JAXP's Transformer.getOutputProperties(). |
public String | getOutputProperty(String
A non-null string that contains the name of the property name)Implements abstract javax. Implements JAXP's Transformer.getOutputProperty(). |
public final Object | Returns: An object that contains the value assigned to the parameterThe name of the parameter name)Implements abstract javax. Implements JAXP's Transformer.getParameter() Returns the value of a given parameter. |
protected TransformerFactoryImpl | getTransformerFactory()
Returns the |
protected AbstractTranslet | getTranslet()
Returns the translet wrapped inside this Transformer or null if this is the identity transform. |
protected TransletOutputHandlerFactory | getTransletOutputHandlerFactory()
Returns the |
public URIResolver | Returns: The URLResolver object currently in useImplements abstract javax. Implements JAXP's Transformer.getURIResolver() Set the object currently used to resolve URIs used in document(). |
private boolean | isDefaultProperty(String name, Properties properties)
Checks if a given output property is default (2nd layer only) |
public boolean | |
public boolean | |
public boolean | |
private void | |
private void | |
public void | reset()
Overrides javax. This method resets the Transformer to its original configuration Transformer code is reset to the same state it was when it was created |
public DOM | retrieveDocument(String
The base URI used by the document call. baseURI, String The href argument passed to the document function. href, Translet A reference to the translet requesting the document translet)Implements com. This class should only be used as a DOMCache for the translet if the URIResolver has been set. |
private void | setDefaults(Properties
a java.util.Property object on which the properties are set. props, String The output method type, one of "xml", "text", "html" ... method)Internal method to get the default properties from the serializer factory and set them on the property object. |
protected void | |
public void | setErrorListener(ErrorListener
The error event listener to use listener)Implements abstract javax. Implements JAXP's Transformer.setErrorListener() Set the error event listener in effect for the transformation. |
public void | setOutputProperties(Properties
The properties to use for the Transformer properties)Implements abstract javax. Implements JAXP's Transformer.setOutputProperties(). |
public void | setOutputProperty(String
The name of the property to set name, String The value to assign to the property value)Implements abstract javax. Implements JAXP's Transformer.setOutputProperty(). |
public void | |
public void | setParameter(String
The name of the parameter name, Object The value to assign to the parameter value)Implements abstract javax. Implements JAXP's Transformer.setParameter() Add a parameter for the transformation. |
public void | |
public void | setURIResolver(URIResolver
The URIResolver to use in document() resolver)Implements abstract javax. Implements JAXP's Transformer.setURIResolver() Set an object that will be used to resolve URIs used in document(). |
private void | transferOutputProperties(AbstractTranslet translet)
Internal method to pass any properties to the translet prior to initiating the transformation |
public void | transferOutputProperties(SerializationHandler handler)
This method is used to pass any properties to the output handler when running the identity transform. |
public void | transform(Source
Contains the input XML document source, Result Will contain the output from the transformation result)Implements abstract javax. Implements JAXP's Transformer.transform() |
private void | transform(Source source, SerializationHandler handler, String encoding)
Internal transformation method - uses the internal APIs of XSLTC |
private void | |
private boolean | validOutputProperty(String name)
Verifies if a given output property name is a property defined in the JAXP 1.1 / TrAX spec |
_accessExternalDTD | back to summary |
---|---|
private String _accessExternalDTD protocols allowed for external DTD references in source file and/or stylesheet. |
_catalogFeatures | back to summary |
---|---|
pack-priv CatalogFeatures _catalogFeatures |
_catalogUriResolver | back to summary |
---|---|
pack-priv CatalogResolver _catalogUriResolver |
_cdataChunkSize | back to summary |
---|---|
pack-priv int _cdataChunkSize |
_defaultListener | back to summary |
---|---|
private final ErrorListener _defaultListener Default error listener |
_dom | back to summary |
---|---|
private DOM _dom A reference to a internal DOM representation of the input. |
_dtmManager | back to summary |
---|---|
private XSLTCDTMManager _dtmManager A reference to the XSLTCDTMManager which is used to build the DOM/DTM for this transformer. |
_encoding | back to summary |
---|---|
private String _encoding The output encoding of this transformation. |
_errorListener | back to summary |
---|---|
private ErrorListener _errorListener An error listener for runtime errors. |
_indentNumber | back to summary |
---|---|
private int _indentNumber Number of indent spaces to add when indentation is on. |
_isIdentity | back to summary |
---|---|
private boolean _isIdentity A flag indicating whether this transformer implements the identity transform. |
_isSecureProcessing | back to summary |
---|---|
private boolean _isSecureProcessing State of the secure processing feature. |
_method | back to summary |
---|---|
private String _method The output method of this transformation. |
_ostream | back to summary |
---|---|
private OutputStream _ostream A reference to the output stream, if we create one in our code. |
_overrideDefaultParser | back to summary |
---|---|
private boolean _overrideDefaultParser Indicates whether 3rd party parser may be used to override the system-default |
_parameters | back to summary |
---|---|
private Map<String, Object> _parameters A map to store parameters for the identity transform. These are not needed during the transformation, but we must keep track of them to be fully complaint with the JAXP API. |
_properties | back to summary |
---|---|
private Properties _properties Output properties of this transformer instance. |
_propertiesClone | back to summary |
---|---|
private Properties _propertiesClone Output properties of this transformer instance. |
_readerManager | back to summary |
---|---|
private XMLReaderManager _readerManager A reference to an object that creates and caches XMLReader objects. |
_securityManager | back to summary |
---|---|
protected XMLSecurityManager _securityManager |
_sourceSystemId | back to summary |
---|---|
private String _sourceSystemId The systemId set in input source. |
_tfactory | back to summary |
---|---|
private TransformerFactoryImpl _tfactory A reference to the transformer factory that this templates object belongs to. |
_tohFactory | back to summary |
---|---|
private TransletOutputHandlerFactory _tohFactory A reference to an output handler factory. |
_translet | back to summary |
---|---|
private AbstractTranslet _translet A reference to the translet or null if the identity transform. |
_uriResolver | back to summary |
---|---|
private URIResolver _uriResolver A reference to a URI resolver for calls to document(). |
_useCatalog | back to summary |
---|---|
pack-priv boolean _useCatalog |
_xsltcIsStandalone | back to summary |
---|---|
pack-priv JdkProperty<String> _xsltcIsStandalone |
LEXICAL_HANDLER_PROPERTY | back to summary |
---|---|
private static final String LEXICAL_HANDLER_PROPERTY |
NAMESPACE_PREFIXES_FEATURE | back to summary |
---|---|
private static final String NAMESPACE_PREFIXES_FEATURE Namespace prefixes feature for |
TransformerImpl | back to summary |
---|---|
protected TransformerImpl(Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory) |
TransformerImpl | back to summary |
---|---|
protected TransformerImpl(Translet translet, Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory) |
clearParameters | back to summary |
---|---|
public void clearParameters() Implements abstract javax. Implements JAXP's Transformer.clearParameters() Clear all parameters set with setParameter. Clears the translet's parameter stack.
|
createOutputProperties | back to summary |
---|---|
private Properties createOutputProperties(Properties outputProperties) Internal method to create the initial set of properties. There are two layers of properties: the default layer and the base layer. The latter contains properties defined in the stylesheet or by the user using this API. |
getDOM | back to summary |
---|---|
private DOM getDOM(Source source) throws TransformerException Builds an internal DOM from a TrAX Source object |
getErrorListener | back to summary |
---|---|
public ErrorListener getErrorListener() Implements abstract javax. Implements JAXP's Transformer.getErrorListener() Get the error event handler in effect for the transformation.
|
getOutputHandler | back to summary |
---|---|
public SerializationHandler getOutputHandler(Result result) throws TransformerException Create an output handler for the transformation output based on the type and contents of the TrAX Result object passed to the transform() method. |
getOutputProperties | back to summary |
---|---|
public Properties getOutputProperties() Implements abstract javax. Implements JAXP's Transformer.getOutputProperties(). Returns a copy of the output properties for the transformation. This is a set of layered properties. The first layer contains properties set by calls to setOutputProperty() and setOutputProperties() on this class, and the output settings defined in the stylesheet's <xsl:output> element makes up the second level, while the default XSLT output settings are returned on the third level.
|
getOutputProperty | back to summary |
---|---|
public String getOutputProperty(String name) throws IllegalArgumentException Implements abstract javax. Implements JAXP's Transformer.getOutputProperty(). Get an output property that is in effect for the transformation. The property specified may be a property that was set with setOutputProperty, or it may be a property specified in the stylesheet.
|
getParameter | back to summary |
---|---|
public final Object getParameter(String name) Implements abstract javax. Implements JAXP's Transformer.getParameter() Returns the value of a given parameter. Note that the translet will not keep values for parameters that were not defined in the stylesheet. |
getTransformerFactory | back to summary |
---|---|
protected TransformerFactoryImpl getTransformerFactory() Returns the |
getTranslet | back to summary |
---|---|
protected AbstractTranslet getTranslet() Returns the translet wrapped inside this Transformer or null if this is the identity transform. |
getTransletOutputHandlerFactory | back to summary |
---|---|
protected TransletOutputHandlerFactory getTransletOutputHandlerFactory() Returns the |
getURIResolver | back to summary |
---|---|
public URIResolver getURIResolver() Implements abstract javax. Implements JAXP's Transformer.getURIResolver() Set the object currently used to resolve URIs used in document().
|
isDefaultProperty | back to summary |
---|---|
private boolean isDefaultProperty(String name, Properties properties) Checks if a given output property is default (2nd layer only) |
isIdentity | back to summary |
---|---|
public boolean isIdentity() |
isSecureProcessing | back to summary |
---|---|
public boolean isSecureProcessing() Return the state of the secure processing feature. |
overrideDefaultParser | back to summary |
---|---|
public boolean overrideDefaultParser() Return the state of the services mechanism feature. |
postErrorToListener | back to summary |
---|---|
private void postErrorToListener(String message) Inform TrAX error listener of an error |
postWarningToListener | back to summary |
---|---|
private void postWarningToListener(String message) Inform TrAX error listener of a warning |
reset | back to summary |
---|---|
public void reset() Overrides javax. This method resets the Transformer to its original configuration Transformer code is reset to the same state it was when it was created
|
retrieveDocument | back to summary |
---|---|
public DOM retrieveDocument(String baseURI, String href, Translet translet) Implements com. This class should only be used as a DOMCache for the translet if the URIResolver has been set. The method implements XSLTC's DOMCache interface, which is used to plug in an external document loader into a translet. This method acts as an adapter between TrAX's URIResolver interface and XSLTC's DOMCache interface. This approach is simple, but removes the possibility of using external document caches with XSLTC. |
setDefaults | back to summary |
---|---|
private void setDefaults(Properties props, String method) Internal method to get the default properties from the serializer factory and set them on the property object.
|
setDOM | back to summary |
---|---|
protected void setDOM(DOM dom) Set the internal DOM that will be used for the next transformation |
setErrorListener | back to summary |
---|---|
public void setErrorListener(ErrorListener listener) throws IllegalArgumentException Implements abstract javax. Implements JAXP's Transformer.setErrorListener() Set the error event listener in effect for the transformation. Register a message handler in the translet in order to forward xsl:messages to error listener.
|
setOutputProperties | back to summary |
---|---|
public void setOutputProperties(Properties properties) throws IllegalArgumentException Implements abstract javax. Implements JAXP's Transformer.setOutputProperties(). Set the output properties for the transformation. These properties will override properties set in the Templates with xsl:output. Unrecognised properties will be quitely ignored.
|
setOutputProperty | back to summary |
---|---|
public void setOutputProperty(String name, String value) throws IllegalArgumentException Implements abstract javax. Implements JAXP's Transformer.setOutputProperty(). Get an output property that is in effect for the transformation. The property specified may be a property that was set with setOutputProperty(), or it may be a property specified in the stylesheet.
|
setOverrideDefaultParser | back to summary |
---|---|
public void setOverrideDefaultParser(boolean flag) Set the state of the services mechanism feature. |
setParameter | back to summary |
---|---|
public void setParameter(String name, Object value) Implements abstract javax. Implements JAXP's Transformer.setParameter() Add a parameter for the transformation. The parameter is simply passed on to the translet - no validation is performed - so any unused parameters are quitely ignored by the translet. |
setSecureProcessing | back to summary |
---|---|
public void setSecureProcessing(boolean flag) Set the state of the secure processing feature. |
setURIResolver | back to summary |
---|---|
public void setURIResolver(URIResolver resolver) Implements abstract javax. Implements JAXP's Transformer.setURIResolver() Set an object that will be used to resolve URIs used in document().
|
transferOutputProperties | back to summary |
---|---|
private void transferOutputProperties(AbstractTranslet translet) Internal method to pass any properties to the translet prior to initiating the transformation |
transferOutputProperties | back to summary |
---|---|
public void transferOutputProperties(SerializationHandler handler) This method is used to pass any properties to the output handler when running the identity transform. |
transform | back to summary |
---|---|
public void transform(Source source, Result result) throws TransformerException Implements abstract javax. Implements JAXP's Transformer.transform()
|
transform | back to summary |
---|---|
private void transform(Source source, SerializationHandler handler, String encoding) throws TransformerException Internal transformation method - uses the internal APIs of XSLTC |
transformIdentity | back to summary |
---|---|
private void transformIdentity(Source source, SerializationHandler handler) throws Exception |
validOutputProperty | back to summary |
---|---|
private boolean validOutputProperty(String name) Verifies if a given output property name is a property defined in the JAXP 1.1 / TrAX spec |
Modifier and Type | Field and Description |
---|---|
private ErrorListener |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | |
public ErrorListener |
_errorListener | back to summary |
---|---|
private ErrorListener _errorListener |
MessageHandler | back to summary |
---|---|
public MessageHandler(ErrorListener errorListener) |
displayMessage | back to summary |
---|---|
public void displayMessage(String msg) Overrides com.
|
getErrorListener | back to summary |
---|---|
public ErrorListener getErrorListener() Overrides com. |