com.caucho.xsl
Class IdentityStylesheet

java.lang.Object
  extended by com.caucho.xsl.AbstractStylesheet
      extended by com.caucho.xsl.StylesheetImpl
          extended by com.caucho.xsl.IdentityStylesheet
All Implemented Interfaces:
CauchoStylesheet, javax.xml.transform.Templates

public class IdentityStylesheet
extends StylesheetImpl

A compiled XSL stylesheet. Stylesheets use 'transform' to transform an XML tree to an XML Document.

The resulting document can be printed, or it can be added to another XML tree.


Field Summary
 
Fields inherited from class com.caucho.xsl.StylesheetImpl
_defaultDisableEscaping, templates, text
 
Fields inherited from class com.caucho.xsl.AbstractStylesheet
_errorPage, _output, _stylesheet, _uriResolver
 
Fields inherited from interface com.caucho.xsl.CauchoStylesheet
CACHE_DEPENDS, DEPENDS, GLOBAL_PARAM
 
Constructor Summary
IdentityStylesheet()
           
 
Method Summary
protected  void applyNode(XslWriter out, org.w3c.dom.Node node)
           
 OutputFormat getOutputFormat()
           
 void transform(org.w3c.dom.Node xml, XMLWriter writer, TransformerImpl transformer)
          Transforms the XML node to a new XML document based on this stylesheet.
 
Methods inherited from class com.caucho.xsl.StylesheetImpl
_xsl_init, addFunction, anyNumber, applyNode, applyNode, applyNodeDefault, copy, exprNumber, getGenerateLocation, getNodeValue, getProperty, getTemplate, init, mergeTemplates, multiNumber, ownerDocument, printValue, setGenerateLocation, setOutputFormat, setProperty, setSpaces, singleNumber, xslSort
 
Methods inherited from class com.caucho.xsl.AbstractStylesheet
addCacheDepend, addDepend, clone, getCacheDepends, getDepends, getOutputProperties, getPath, getURIResolver, isModified, newTransformer, setURIResolver
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityStylesheet

public IdentityStylesheet()
Method Detail

transform

public void transform(org.w3c.dom.Node xml,
                      XMLWriter writer,
                      TransformerImpl transformer)
               throws org.xml.sax.SAXException,
                      java.io.IOException,
                      javax.xml.transform.TransformerException
Transforms the XML node to a new XML document based on this stylesheet.

Since Documents are DocumentFragments, calling functions can insert the contents using appendChild.

Overrides:
transform in class StylesheetImpl
Parameters:
xml - source xml to convert
out - source xml to convert
Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerException

applyNode

protected void applyNode(XslWriter out,
                         org.w3c.dom.Node node)
                  throws org.xml.sax.SAXException,
                         java.io.IOException,
                         javax.xml.transform.TransformerException
Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerException

getOutputFormat

public OutputFormat getOutputFormat()
Overrides:
getOutputFormat in class StylesheetImpl