fi.hut.tml.xsmiles.xslt
Class JaxpXSLT

java.lang.Object
  extended byfi.hut.tml.xsmiles.xslt.JaxpXSLT
All Implemented Interfaces:
XSLTEngine

public class JaxpXSLT
extends java.lang.Object
implements XSLTEngine


Constructor Summary
JaxpXSLT()
           
 
Method Summary
static void SerializeNode(java.io.Writer writer, org.w3c.dom.Node node, boolean preserveSpace, boolean indenting, boolean addXMLDecl)
          this method checks the JDK version, since there are serialization problems in JDK 1.1
static void SerializeNodeJAXP(java.io.Writer writer, org.w3c.dom.Node node, boolean preserveSpace, boolean indenting, boolean addXMLDecl)
          preferred method, which works under jdk1.3 with xerces 2.4.0 DOM3 + Xalan 2.5.1
static void SerializeNodeXerces(java.io.Writer writer, org.w3c.dom.Node node, boolean preserveSpace, boolean indenting, boolean addXMLDecl)
          method, which works under jdk1.1 with xerces 2.4.0 DOM3 + Xalan 2.5.1
 org.w3c.dom.Document transform(org.w3c.dom.Document xml, org.w3c.dom.Document xsl, java.net.URL base_url)
          Parses xml and xsl documents passed as URL's
 org.w3c.dom.Document transform(org.w3c.dom.Document xml, java.net.URL xsl, java.net.URL base_url)
          Parses xml and xsl documents passed as URL's
protected  org.w3c.dom.Document transform(javax.xml.transform.Source xml, javax.xml.transform.Source xsl)
           
 org.w3c.dom.Document transform(java.net.URL xml, java.net.URL xsl)
          Parses xml as Document and xsl document passed as URL's
 java.lang.String transformToString(java.net.URL xml, java.net.URL xsl)
          Legacy method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxpXSLT

public JaxpXSLT()
Method Detail

transform

public org.w3c.dom.Document transform(org.w3c.dom.Document xml,
                                      org.w3c.dom.Document xsl,
                                      java.net.URL base_url)
                               throws org.xml.sax.SAXException,
                                      javax.xml.transform.TransformerException
Parses xml and xsl documents passed as URL's

Specified by:
transform in interface XSLTEngine
Parameters:
xml - the source XML DOM document
xsl - the XSL as DOM document
Returns:
the output of the evalauted xml and xsl URL documents as a DOM document
Throws:
org.xml.sax.SAXException
javax.xml.transform.TransformerException

transform

public org.w3c.dom.Document transform(org.w3c.dom.Document xml,
                                      java.net.URL xsl,
                                      java.net.URL base_url)
                               throws org.xml.sax.SAXException,
                                      javax.xml.transform.TransformerException
Parses xml and xsl documents passed as URL's

Specified by:
transform in interface XSLTEngine
Parameters:
xml - the source XML DOM document
xsl - the XSL as DOM document
Returns:
the output of the evalauted xml and xsl URL documents as a DOM document
Throws:
org.xml.sax.SAXException
javax.xml.transform.TransformerException

transform

public org.w3c.dom.Document transform(java.net.URL xml,
                                      java.net.URL xsl)
                               throws org.xml.sax.SAXException,
                                      javax.xml.transform.TransformerException
Description copied from interface: XSLTEngine
Parses xml as Document and xsl document passed as URL's

Specified by:
transform in interface XSLTEngine
Parameters:
xml - the source XML DOM document
xsl - the XSLURL document
Returns:
the output of the evalauted xml and xsl URL documents as a DOM document
Throws:
org.xml.sax.SAXException
javax.xml.transform.TransformerException

transformToString

public java.lang.String transformToString(java.net.URL xml,
                                          java.net.URL xsl)
                                   throws org.xml.sax.SAXException,
                                          javax.xml.transform.TransformerException
Legacy method. Parses xml and xsl documents passed as URL's

Specified by:
transformToString in interface XSLTEngine
Parameters:
xml - URL of the xml Document
xsl - URL of the stylsheet
Returns:
the output of the evalauted xml and xsl URL documents as string
Throws:
org.xml.sax.SAXException
javax.xml.transform.TransformerException

transform

protected org.w3c.dom.Document transform(javax.xml.transform.Source xml,
                                         javax.xml.transform.Source xsl)
                                  throws org.xml.sax.SAXException,
                                         javax.xml.transform.TransformerException
Throws:
org.xml.sax.SAXException
javax.xml.transform.TransformerException

SerializeNode

public static void SerializeNode(java.io.Writer writer,
                                 org.w3c.dom.Node node,
                                 boolean preserveSpace,
                                 boolean indenting,
                                 boolean addXMLDecl)
                          throws javax.xml.transform.TransformerException,
                                 javax.xml.transform.TransformerConfigurationException,
                                 org.xml.sax.SAXException,
                                 java.io.IOException
this method checks the JDK version, since there are serialization problems in JDK 1.1

Throws:
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
org.xml.sax.SAXException
java.io.IOException

SerializeNodeJAXP

public static void SerializeNodeJAXP(java.io.Writer writer,
                                     org.w3c.dom.Node node,
                                     boolean preserveSpace,
                                     boolean indenting,
                                     boolean addXMLDecl)
                              throws javax.xml.transform.TransformerException,
                                     javax.xml.transform.TransformerConfigurationException,
                                     org.xml.sax.SAXException,
                                     java.io.IOException
preferred method, which works under jdk1.3 with xerces 2.4.0 DOM3 + Xalan 2.5.1

Throws:
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
org.xml.sax.SAXException
java.io.IOException

SerializeNodeXerces

public static void SerializeNodeXerces(java.io.Writer writer,
                                       org.w3c.dom.Node node,
                                       boolean preserveSpace,
                                       boolean indenting,
                                       boolean addXMLDecl)
                                throws javax.xml.transform.TransformerException,
                                       javax.xml.transform.TransformerConfigurationException,
                                       org.xml.sax.SAXException,
                                       java.io.IOException
method, which works under jdk1.1 with xerces 2.4.0 DOM3 + Xalan 2.5.1

Throws:
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
org.xml.sax.SAXException
java.io.IOException


X-Smiles 1.2