|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.transform.Transformer | +--com.caucho.xsl.TransformerImpl
Field Summary | |
static java.lang.String |
CACHE_DEPENDS
|
protected java.util.ArrayList |
cacheDepends
|
static java.lang.String |
GENERATE_LOCATION
|
protected static L10N |
L
|
static java.lang.String |
LINE_MAP
|
protected com.caucho.java.LineMap |
lineMap
|
protected java.util.HashMap |
parameters
|
protected java.util.HashMap |
properties
|
protected StylesheetImpl |
stylesheet
|
Constructor Summary | |
protected |
TransformerImpl(StylesheetImpl stylesheet)
|
Method Summary | |
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 |
getCacheDepends()
|
ErrorListener |
getErrorListener()
Returns the error listener. |
boolean |
getFeature(java.lang.String name)
Returns true if the Transformer implements the feature. |
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)
Gets a transformer/stylesheet property. |
StylesheetImpl |
getStylesheet()
|
URIResolver |
getURIResolver()
Returns the URI to filename resolver. |
protected Node |
parseDocument(java.io.InputStream is,
java.lang.String systemId)
Parses the source XML document from the input stream. |
protected Node |
parseDocument(Source source)
Parses the source XML document from the source. |
protected Node |
parseDocument(java.lang.String url)
Parses the source document specified by a URL |
protected Node |
parseStringDocument(java.lang.String source,
java.lang.String systemId)
Parses a string as an XML document. |
void |
setErrorListener(ErrorListener errorListener)
Sets the error listener. |
void |
setFeature(java.lang.String name,
boolean enable)
Sets a transformer feature. |
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)
Sets a transformer/stylesheet property. |
void |
setURIResolver(URIResolver uriResolver)
Sets the URI to filename resolver. |
void |
transform(Node sourceNode,
org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
Transforms from the source node to the sax handlers. |
Node |
transform(Node sourceNode,
Node destNode)
Transforms from the source node to the destination node, returning the destination node. |
void |
transform(Node node,
java.io.OutputStream os)
|
void |
transform(Node node,
java.io.OutputStream os,
java.lang.String encoding)
Transforms from a DOM node to an output stream. |
void |
transform(Source source,
Result result)
Transforms the source into the result. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
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 properties
protected java.util.HashMap parameters
protected com.caucho.java.LineMap lineMap
protected java.util.ArrayList cacheDepends
Constructor Detail |
protected TransformerImpl(StylesheetImpl stylesheet)
Method Detail |
public URIResolver getURIResolver()
getURIResolver
in class Transformer
public void setURIResolver(URIResolver uriResolver)
setURIResolver
in class Transformer
public ErrorListener getErrorListener()
getErrorListener
in class Transformer
public void setErrorListener(ErrorListener errorListener)
setErrorListener
in class Transformer
public boolean getFeature(java.lang.String name)
Transformer
getFeature
in interface Transformer
com.caucho.transform.Transformer
name
- name of the featurepublic void setFeature(java.lang.String name, boolean enable)
Transformer
setFeature
in interface Transformer
com.caucho.transform.Transformer
name
- name of the featurevalue
- enable or disable the featurepublic StylesheetImpl getStylesheet()
public java.lang.Object getProperty(java.lang.String name)
Transformer
getProperty
in interface Transformer
com.caucho.transform.Transformer
name
- name of the propertypublic void setProperty(java.lang.String name, java.lang.Object value)
Transformer
setProperty
in interface Transformer
com.caucho.transform.Transformer
name
- name of the propertyvalue
- value of the propertypublic void setParameter(java.lang.String name, java.lang.Object value)
setParameter
in interface Transformer
setParameter
in class Transformer
name
- the name of the XPath variable.value
- the value for the variable.public java.util.Properties getOutputProperties()
getOutputProperties
in class Transformer
public void setOutputProperties(java.util.Properties properties)
setOutputProperties
in class Transformer
properties
- the new output properties.public void setOutputProperty(java.lang.String name, java.lang.String value)
setOutputProperty
in class Transformer
name
- the name of the property.value
- the value of the property.public java.lang.String getOutputProperty(java.lang.String name)
getOutputProperty
in class Transformer
name
- the name of the property.public java.lang.Object getParameter(java.lang.String name)
getParameter
in interface Transformer
getParameter
in class Transformer
name
- the name of the parameter.public void clearParameters()
clearParameters
in class Transformer
public void addFunction(java.lang.String name, XPathFun fun)
addFunction
in interface Transformer
name
- the name of the function.fun
- the new function.public void transform(Source source, Result result) throws TransformerException
transform
in class Transformer
source
- descriptor specifying the input source.result
- descriptor specifying the output result.public void transform(Node node, java.io.OutputStream os) throws TransformerException
public void transform(Node node, java.io.OutputStream os, java.lang.String encoding) throws TransformerException
node
- the source nodeos
- the destination streampublic Node transform(Node sourceNode, Node destNode) throws org.xml.sax.SAXException, java.io.IOException
public void transform(Node sourceNode, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler) throws org.xml.sax.SAXException, java.io.IOException, TransformerException
protected Node parseDocument(Source source) throws java.io.IOException, org.xml.sax.SAXException, TransformerException
source
- the JAXP source.protected 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 sourceprotected Node parseDocument(java.lang.String url) throws java.io.IOException, org.xml.sax.SAXException
url
- path to the document to be parsed.protected 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.public void addCacheDepend(Path path)
protected void addCacheDepend(java.lang.String path)
public java.util.ArrayList getCacheDepends()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |