javax.xml.transform.sax
Class SAXSource

java.lang.Object
  |
  +--javax.xml.transform.sax.SAXSource
All Implemented Interfaces:
Source

public class SAXSource
extends java.lang.Object
implements Source

Acts as a holder for "pull style" inputs to an XSLT transform. SAX based transforms can support a second style of inputs, driving by a TransformerHandler as output of some other SAX processing pipeline. stage.

Version:
1.0
Author:
Andrew Selkirk, David Brownell
See Also:
SAXTransformerFactory.newTransformerHandler(javax.xml.transform.Source)

Field Summary
static java.lang.String FEATURE
          Used with TransformerFactory.getFeature() to determine whether the transformers it produces support SAXSource objects (possibly without URIs) as inputs.
 
Constructor Summary
SAXSource()
           
SAXSource(InputSource source)
           
SAXSource(XMLReader reader, InputSource source)
           
 
Method Summary
 InputSource getInputSource()
           
 java.lang.String getSystemId()
          Returns the URI for this source.
 XMLReader getXMLReader()
           
 void setInputSource(InputSource source)
           
 void setSystemId(java.lang.String systemID)
          Associates a URI with this source.
 void setXMLReader(XMLReader reader)
           
static InputSource sourceToInputSource(Source in)
          Creates a SAX input source from its argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FEATURE

public static final java.lang.String FEATURE
Used with TransformerFactory.getFeature() to determine whether the transformers it produces support SAXSource objects (possibly without URIs) as inputs.
Constructor Detail

SAXSource

public SAXSource()

SAXSource

public SAXSource(XMLReader reader,
                 InputSource source)

SAXSource

public SAXSource(InputSource source)
Method Detail

setXMLReader

public void setXMLReader(XMLReader reader)

getXMLReader

public XMLReader getXMLReader()

setInputSource

public void setInputSource(InputSource source)

getInputSource

public InputSource getInputSource()

setSystemId

public void setSystemId(java.lang.String systemID)
Description copied from interface: Source
Associates a URI with this source.
Specified by:
setSystemId in interface Source
Following copied from interface: javax.xml.transform.Source
Parameters:
systemID - the URI

getSystemId

public java.lang.String getSystemId()
Description copied from interface: Source
Returns the URI for this source. Some sources may not need URIs, for example ones provided as an input stream, but such URIs are important for resolving relative URIs and for providing usable diagnostics.
Specified by:
getSystemId in interface Source

sourceToInputSource

public static InputSource sourceToInputSource(Source in)
Creates a SAX input source from its argument. Understands StreamSource and System ID based input sources, and insists on finding either a system ID (URI) or some kind of input stream (character or byte).
Parameters:
in - TRAX style input source
Returns:
SAX input source, or null if one could not be created.


Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2001-11-20.