| Home >> All >> org >> jdom >> [ transform Javadoc ] |
org.jdom.transform: Javadoc index of package org.jdom.transform.
Package Samples:
org.jdom.transform: Classes to represent the components of an XML document.
Classes:
XSLTransformer: A convenience class to handle simple transformations. The JAXP TrAX classes have more bells and whistles and can be used with JDOMSource and JDOMResult for advanced uses. This class handles the common case and presents a simple interface. XSLTransformer is thread safe and may be used from multiple threads. XSLTransformer transformer = new XSLTransformer("file.xsl"); Document x2 = transformer.transform(x); // x is a Document Document y2 = transformer.transform(y); // y is a Document JDOM relies on TrAX to perform the transformation. The javax.xml.transform.TransformerFactory Java system property ...
JDOMResult: A holder for an XSL Transformation result, generally a list of nodes although it can be a JDOM Document also. As stated by the XSLT 1.0 specification, the result tree generated by an XSL transformation is not required to be a well-formed XML document. The result tree may have "any sequence of nodes as children that would be possible for an element node". 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: public static List transform(Document doc, String stylesheet) throws JDOMException { try { ...
JDOMSource: A holder for an XML Transformation source: a Document, Element, or list of nodes. The is provides 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: public static List transform(Document doc, String stylesheet) throws JDOMException { try { Transformer transformer = TransformerFactory.newInstance() .newTransformer(new StreamSource(stylesheet)); JDOMSource in = new JDOMSource(doc); JDOMResult out = new JDOMResult(); transformer.transform(in, out); return out.getResult(); ...
XSLTransformException: Thrown when an XSL stylesheet fails to compile or an XSL transform fails
| Home | Contact Us | Privacy Policy | Terms of Service |