Share on Google+Share on Google+

The XML Style Sheet Translation (XSLT) APIs

In this section, you will learn about the XML Style Sheet Translation(XSLT)APIs.

The XML Style Sheet Translation (XSLT) APIs


The XSLT Packages








The XSLT APIs are defined in the following packages:

Package Description
javax.xml.transform Defines the TransformerFactory and Transformer  classes. These classes are  used to get a object for doing transformations. After creating a transformer object,  its transform() method is invoked. This method provides an input (source) and output (result).
javax.xml.transform.dom Defines classes used  to create input and output  objects from a DOM.
javax.xml.transform.sax Defines classes used to create input  from a SAX parser and output objects from a SAX event handler. Defines classes used to create input  and output  objects from an I/O stream.

The diagram  shows the working of the XSLT APIs .

A TransformerFactory object is instantiated, and used to create a Transformer. The source (input) object acts as the input to the transformation process. This object is created from SAX reader, from a DOM, or from an input stream.

The output (result) object is the result of this transformation process. This object can be a SAX event handler, a DOM, or an output stream. Transformer is created from a set of transformation instructions. If it is created without any specific instructions, then the transformer object simply copies the source to the result.




Posted on: May 25, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: The XML Style Sheet Translation (XSLT) APIs  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image