|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.idom.transform.Transformer
public class Transformer
Transforms an iDOM Document.
| Constructor Summary | |
|---|---|
Transformer()
Transformer constructor without stylesheet. |
|
Transformer(Source source)
Constructs a transformer with a stylesheet in form of Source. |
|
| Method Summary | |
|---|---|
void |
enableOutputDocType(boolean enable)
Sets whether to output the doc type. |
ErrorListener |
getErrorListener()
Get the error event handler in effect for the transformation. |
Properties |
getOutputProperties()
Get a copy of the output properties for the transformation. |
String |
getOutputProperty(String name)
Get an output property that is in effect for the transformation. |
Transformer |
getTransformer()
Returns the JAXP transformer encapsulated by this object. |
void |
setErrorListener(ErrorListener listener)
Set the error event listener in effect for the transformation. |
void |
setOutputProperties(Properties props)
Set the output properties for the transformation. |
void |
setOutputProperty(String name,
String value)
Set an output property that will be in effect for the transformation. |
Document |
transform(Document doc)
Transforms an iDOM document and returns the transformed result as another iDOM Document. |
void |
transform(Document doc,
Result result)
Transforms from an iDOM document to a result. |
Document |
transform(Element elm)
Transforms an iDOM element and returns the transformed result as another iDOM Document. |
void |
transform(Element elm,
Result result)
Transforms from an iDOM element to a result. |
Document |
transform(Source source)
Transforms a source and returns the transformed result as an iDOM Document. |
void |
transform(Source source,
Result result)
Transforms from a source to a result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Transformer()
throws TransformerConfigurationException
TransformerConfigurationException
public Transformer(Source source)
throws TransformerConfigurationException
Examples:
See javax.xml.transform.stream.StreamSource and javax.xml.transform.dom.DOMSource
TransformerConfigurationException| Method Detail |
|---|
public final void enableOutputDocType(boolean enable)
Useful only if Document is used in transform(), e.g.,
transform(Document, Result).
If not, you have to set OutputKeys.DOCTYPE_SYSTEM and
OutputKeys.DOCTYPE_PUBLIC explicitly (thru getTransformer()).
public final Transformer getTransformer()
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.
public final void transform(Source source,
Result result)
throws TransformerException
source - the sourceresult - the result
TransformerExceptiontransform(Document, Result)
public final void transform(Document doc,
Result result)
throws TransformerException
Examples:
transform(Source) and transform(Document).See javax.xml.transform.stream.StreamResult and javax.xml.transform.dom.DOMResult
doc - the source documentresult - the result
TransformerExceptiontransform(Source, Result),
transform(Document)
public final void transform(Element elm,
Result result)
throws TransformerException
elm - the source elementresult - the result
TransformerException
public final Document transform(Source source)
throws TransformerException
source - the source
TransformerException
public final Document transform(Document doc)
throws TransformerException
doc - the source document
TransformerException
public final Document transform(Element elm)
throws TransformerException
elm - the source element
TransformerExceptionpublic final Properties getOutputProperties()
public final String getOutputProperty(String name)
public final void setOutputProperty(String name,
String value)
public final void setOutputProperties(Properties props)
public final ErrorListener getErrorListener()
public final void setErrorListener(ErrorListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||