Public Member Functions | |
JDOMSource (Document source) | |
JDOMSource (List source) | |
JDOMSource (Element source) | |
void | setDocument (Document source) |
Document | getDocument () |
void | setNodes (List source) |
List | getNodes () |
void | setInputSource (InputSource inputSource) throws UnsupportedOperationException |
void | setXMLReader (XMLReader reader) throws UnsupportedOperationException |
XMLReader | getXMLReader () |
Static Public Attributes | |
final String | JDOM_FEATURE |
This class shall be used to wrap a JDOM Document to provide it as input to a JAXP TrAX Transformer.
The following example shows how to apply an XSL Transformation to a JDOM document and get the transformation result in the form of a list of JDOM nodes: <blockquote>
public static List transform(Document in, String stylesheet) throws JDOMException { try { Transformer transformer = TransformerFactory.newInstance() .newTransformer(new StreamSource(stylesheet));
JDOMResult out = new JDOMResult(); transformer.transform(new JDOMSource(in), out); return out.getResult(); } catch (TransformerException e) { throw new JDOMException("XSLT Trandformation failed", e); } }</blockquote>
Jason Hunter
|
Creates a JDOM TRaX source wrapping a JDOM document.
|
|
Creates a JDOM TRaX source wrapping a list of JDOM nodes.
|
|
Creates a JDOM TRaX source wrapping a JDOM element.
|
|
Returns the source document used by this TRaX source.
|
|
Returns the source node list used by this TRaX source.
|
|
Returns the XMLReader to be used for the Source. This implementation returns a specific XMLReader reading the XML data from the source JDOM document.
|
|
Sets the source document used by this TRaX source.
|
|
Sets the SAX InputSource to be used for the Source. As this implementation only supports JDOM document as data source, this method always throws an UnsupportedOperationException.
|
|
Sets the source node list used by this TRaX source.
|
|
Set the XMLReader to be used for the Source. As this implementation only supports JDOM document as data source, this method throws an UnsupportedOperationException if the provided reader object does not implement the SAX XMLFilter interface. Otherwise, the JDOM document reader will be attached as parent of the filter chain.
|
|
Initial value:
"http://org.jdom.transform.JDOMSource/feature"
true when passed this value as an argument, the Transformer natively supports JDOM. Note: This implementation does not override the SAXSource#FEATURE value defined by its superclass to be considered as a SAXSource by Transformer implementations not natively supporting JDOM. |