| JavaTM 2 Platform Std. Ed. v1.5.0 
 
Package javax.xml.transform.sax
This package implements SAX2-specific transformation APIs.
See:
Description
 
 
| Interface Summary |  
| TemplatesHandler | A SAX ContentHandler that may be used to process SAX
 parse events (parsing transformation instructions) into a Templates object. |  
| TransformerHandler | A TransformerHandler
 listens for SAX ContentHandler parse events and transforms
 them to a Result. |  
 
| Class Summary |  
| SAXResult | Acts as an holder for a transformation Result. |  
| SAXSource | Acts as an holder for SAX-style Source. |  
| SAXTransformerFactory | This class extends TransformerFactory to provide SAX-specific
 factory methods. |  
 
Package javax.xml.transform.sax Description
 This package implements SAX2-specific transformation APIs. It provides
  classes which allow input from ContentHandlerevents, and also classes that produce org.xml.sax.ContentHandler events. It
  also provides methods to set the input source as anXMLReader, or to use aInputSourceas the source. It also allows the
  creation of aXMLFilter, which enables
  transformations to "pull" from other transformations, and lets the transformer
  to be used polymorphically as anXMLReader. The SAXSourceclass allows the
  setting of anXMLReaderto be used for "pulling"
  parse events, and anInputSourcethat may be used to
  specify the SAX source. The SAXResultclass allows the
  setting of aContentHandlerto be the receiver of
  SAX2 events from the transformation. The SAXTransformerFactoryextendsTransformerFactoryto provide factory
  methods for creatingTemplatesHandler,TransformerHandler, andXMLReaderinstances. To obtain a SAXTransformerFactory,
  the caller must cast theTransformerFactoryinstance returned fromTransformerFactory.newInstance(). The TransformerHandlerinterface
  allows a transformation to be created from SAX2 parse events, which is a "push"
  model rather than the "pull" model that normally occurs for a transformation.
  Normal parse events are received through theContentHandlerinterface, lexical events such as
  startCDATA and endCDATA are received through theLexicalHandlerinterface, and events that signal
  the start or end of disabling output escaping are received viaContentHandler.processingInstruction(java.lang.String, java.lang.String), with the
  target parameter beingResult.PI_DISABLE_OUTPUT_ESCAPINGandResult.PI_ENABLE_OUTPUT_ESCAPING. If
  parameters, output properties, or other features need to be set on the
  Transformer handler, aTransformerreference
  will need to be obtained fromTransformerHandler.getTransformer(), and
  the methods invoked from that reference. The TemplatesHandlerinterface
  allows the creation ofTemplatesobjects
  from SAX2 parse events. Once theContentHandlerevents are complete, the Templates object may be obtained fromTemplatesHandler.getTemplates(). Note thatTemplatesHandler.setSystemId(java.lang.String)should
  normally be called in order to establish a base system ID from which relative
  URLs may be resolved. The
  SAXTransformerFactory.newXMLFilter(javax.xml.transform.Source)method allows the creation of aXMLFilter, which
  encapsulates the SAX2 notion of a "pull" transformation. The following
  illustrates several transformations chained together. Each filter points to a
  parentXMLReader, and the final transformation is
  caused by invokingXMLReader.parse(org.xml.sax.InputSource)on the final
  reader in the chain. 
 
 
 
 Copyright 2003 Sun Microsystems, Inc. All rights reserved |