public class TransformerImpl
extends javax.xml.transform.Transformer
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<Path> |
_cacheDepends |
protected LineMap |
_lineMap |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
_parameters |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
_properties |
protected StylesheetImpl |
_stylesheet |
static java.lang.String |
CACHE_DEPENDS |
static java.lang.String |
GENERATE_LOCATION |
protected static L10N |
L |
static java.lang.String |
LINE_MAP |
| Modifier | Constructor and Description |
|---|---|
protected |
TransformerImpl(StylesheetImpl stylesheet) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheDepend(Path path) |
protected void |
addCacheDepend(java.lang.String path) |
void |
addFunction(java.lang.String name,
XPathFun fun)
Adds a new custom function.
|
void |
clearParameters()
Clears all the external stylesheet parameters.
|
java.util.ArrayList<Path> |
getCacheDepends() |
javax.xml.transform.ErrorListener |
getErrorListener()
Returns the error listener.
|
boolean |
getFeature(java.lang.String name) |
java.util.Properties |
getOutputProperties()
Returns a copy of the xsl:output properties.
|
java.lang.String |
getOutputProperty(java.lang.String name)
Returns the value of a single named xsl:output property.
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the named stylesheet parameter.
|
java.lang.Object |
getProperty(java.lang.String name) |
StylesheetImpl |
getStylesheet() |
javax.xml.transform.URIResolver |
getURIResolver()
Returns the URI to filename resolver.
|
protected org.w3c.dom.Node |
parseDocument(java.io.InputStream is,
java.lang.String systemId)
Parses the source XML document from the input stream.
|
protected org.w3c.dom.Node |
parseDocument(javax.xml.transform.Source source)
Parses the source XML document from the source.
|
protected org.w3c.dom.Node |
parseDocument(java.lang.String url)
Parses the source document specified by a URL
|
protected org.w3c.dom.Node |
parseStringDocument(java.lang.String source,
java.lang.String systemId)
Parses a string as an XML document.
|
void |
setErrorListener(javax.xml.transform.ErrorListener errorListener)
Sets the error listener.
|
void |
setFeature(java.lang.String name,
boolean enable) |
void |
setOutputProperties(java.util.Properties properties)
Sets the output properties.
|
void |
setOutputProperty(java.lang.String name,
java.lang.String value)
Sets a single xsl:output property.
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets a parameter that XPath expressions in the stylesheet can
use as $name.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setURIResolver(javax.xml.transform.URIResolver uriResolver)
Sets the URI to filename resolver.
|
void |
transform(org.w3c.dom.Node sourceNode,
org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
Transforms from the source node to the sax handlers.
|
org.w3c.dom.Node |
transform(org.w3c.dom.Node sourceNode,
org.w3c.dom.Node destNode)
Transforms from the source node to the destination node, returning
the destination node.
|
void |
transform(org.w3c.dom.Node node,
java.io.OutputStream os) |
void |
transform(org.w3c.dom.Node node,
java.io.OutputStream os,
java.lang.String encoding,
java.lang.String systemId)
Transforms from a DOM node to an output stream.
|
void |
transform(javax.xml.transform.Source source,
javax.xml.transform.Result result)
Transforms the source into the result.
|
protected static L10N L
public static final java.lang.String LINE_MAP
public static final java.lang.String CACHE_DEPENDS
public static final java.lang.String GENERATE_LOCATION
protected StylesheetImpl _stylesheet
protected java.util.HashMap<java.lang.String,java.lang.Object> _properties
protected java.util.HashMap<java.lang.String,java.lang.Object> _parameters
protected LineMap _lineMap
protected java.util.ArrayList<Path> _cacheDepends
protected TransformerImpl(StylesheetImpl stylesheet)
public javax.xml.transform.URIResolver getURIResolver()
getURIResolver in class javax.xml.transform.Transformerpublic void setURIResolver(javax.xml.transform.URIResolver uriResolver)
setURIResolver in class javax.xml.transform.Transformerpublic javax.xml.transform.ErrorListener getErrorListener()
getErrorListener in class javax.xml.transform.Transformerpublic void setErrorListener(javax.xml.transform.ErrorListener errorListener)
setErrorListener in class javax.xml.transform.Transformerpublic boolean getFeature(java.lang.String name)
public void setFeature(java.lang.String name,
boolean enable)
public StylesheetImpl getStylesheet()
public java.lang.Object getProperty(java.lang.String name)
public void setProperty(java.lang.String name,
java.lang.Object value)
public void setParameter(java.lang.String name,
java.lang.Object value)
setParameter in class javax.xml.transform.Transformername - the name of the XPath variable.value - the value for the variable.public java.util.Properties getOutputProperties()
getOutputProperties in class javax.xml.transform.Transformerpublic void setOutputProperties(java.util.Properties properties)
setOutputProperties in class javax.xml.transform.Transformerproperties - the new output properties.public void setOutputProperty(java.lang.String name,
java.lang.String value)
setOutputProperty in class javax.xml.transform.Transformername - the name of the property.value - the value of the property.public java.lang.String getOutputProperty(java.lang.String name)
getOutputProperty in class javax.xml.transform.Transformername - the name of the property.public java.lang.Object getParameter(java.lang.String name)
getParameter in class javax.xml.transform.Transformername - the name of the parameter.public void clearParameters()
clearParameters in class javax.xml.transform.Transformerpublic void addFunction(java.lang.String name,
XPathFun fun)
name - the name of the function.fun - the new function.public void transform(javax.xml.transform.Source source,
javax.xml.transform.Result result)
throws javax.xml.transform.TransformerException
transform in class javax.xml.transform.Transformersource - descriptor specifying the input source.result - descriptor specifying the output result.javax.xml.transform.TransformerExceptionpublic void transform(org.w3c.dom.Node node,
java.io.OutputStream os)
throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void transform(org.w3c.dom.Node node,
java.io.OutputStream os,
java.lang.String encoding,
java.lang.String systemId)
throws javax.xml.transform.TransformerException
node - the source nodeos - the destination streamjavax.xml.transform.TransformerExceptionpublic org.w3c.dom.Node transform(org.w3c.dom.Node sourceNode,
org.w3c.dom.Node destNode)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic void transform(org.w3c.dom.Node sourceNode,
org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
throws org.xml.sax.SAXException,
java.io.IOException,
javax.xml.transform.TransformerException
org.xml.sax.SAXExceptionjava.io.IOExceptionjavax.xml.transform.TransformerExceptionprotected org.w3c.dom.Node parseDocument(javax.xml.transform.Source source)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.transform.TransformerException
source - the JAXP source.java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.transform.TransformerExceptionprotected org.w3c.dom.Node parseDocument(java.io.InputStream is,
java.lang.String systemId)
throws java.io.IOException,
org.xml.sax.SAXException
is - the source input stream.systemId - the path of the sourcejava.io.IOExceptionorg.xml.sax.SAXExceptionprotected org.w3c.dom.Node parseDocument(java.lang.String url)
throws java.io.IOException,
org.xml.sax.SAXException
url - path to the document to be parsed.java.io.IOExceptionorg.xml.sax.SAXExceptionprotected org.w3c.dom.Node parseStringDocument(java.lang.String source,
java.lang.String systemId)
throws java.io.IOException,
org.xml.sax.SAXException
source - the string to use as the XML sourcesystemId - the URL for the string document.java.io.IOExceptionorg.xml.sax.SAXExceptionpublic void addCacheDepend(Path path)
protected void addCacheDepend(java.lang.String path)
public java.util.ArrayList<Path> getCacheDepends()