| java.lang.Object org.zkoss.idom.transform.Transformer
Constructor Summary | |
public | Transformer() Transfomer constructor without stylesheet. | public | Transformer(Source source) Constructs a transformer with a stylesheet in form of Source. |
Transformer | public Transformer(Source source) throws TransformerConfigurationException(Code) | | Constructs a transformer with a stylesheet in form of Source.
Examples:
- File file
- new Transformer(new javax.xml.transform.stream.StreamSource(file));
- Reader reader
- new Transformer(new javax.xml.transform.stream.StreamSource(reader));
- URL url
- new Transformer(new javax.xml.transform.stream.StreamSource(url.openStream()));
- iDOM or DOM dom
- new Transformer(new javax.xml.transform.dom.DOMSource(dom));
See javax.xml.transform.stream.StreamSource
and javax.xml.transform.dom.DOMSource
|
getErrorListener | final public ErrorListener getErrorListener()(Code) | | Get the error event handler in effect for the transformation.
|
getOutputProperties | final public Properties getOutputProperties()(Code) | | Get a copy of the output properties for the transformation.
|
getOutputProperty | final public String getOutputProperty(String name)(Code) | | Get an output property that is in effect for the transformation.
|
getTransformer | final public javax.xml.transform.Transformer getTransformer()(Code) | | Returns the JAXP transformer encapsulated by this object.
Then, you can use it to set properties, listener and so on.
Notice: OutputKeys.DOCTYPE_SYSTEM and OutputKeys.DOCTYPE_PUBLIC
are set automatically if outDocType is true when constructing
this object and
Document is used to transform.
|
setErrorListener | final public void setErrorListener(ErrorListener listener)(Code) | | Set the error event listener in effect for the transformation.
|
setOutputProperties | final public void setOutputProperties(Properties props)(Code) | | Set the output properties for the transformation.
|
setOutputProperty | final public void setOutputProperty(String name, String value)(Code) | | Set an output property that will be in effect for the transformation.
|
transform | final public void transform(Element elm, Result result) throws TransformerException(Code) | | Transforms from an iDOM element to a result.
Parameters: elm - the source element Parameters: result - the result |
transform | final public Document transform(Source source) throws TransformerException(Code) | | Trasforms a source and returns the transformed result as
an iDOM Document.
Parameters: source - the source the transformed result in an iDOM document |
transform | final public Document transform(Document doc) throws TransformerException(Code) | | Trasforms an iDOM document and returns the transformed result as
another iDOM Document.
Parameters: doc - the source document the transformed result in an iDOM document |
transform | final public Document transform(Element elm) throws TransformerException(Code) | | Trasforms an iDOM element and returns the transformed result as
another iDOM Document.
Parameters: elm - the source element the transformed result in an iDOM document |
|
|