java.lang.Object | |
↳ | javax.xml.transform.sax.SAXSource |
Acts as an holder for SAX-style Source.
Note that XSLT requires namespace support. Attempting to transform an
input source that is not
generated with a namespace-aware parser may result in errors.
Parsers can be made namespace aware by calling the
setNamespaceAware(boolean)
method.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | FEATURE | If getFeature(String)
returns true when passed this value as an argument,
the Transformer supports Source input of this type. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Zero-argument default constructor. | |||||||||||
Create a
SAXSource , using an XMLReader
and a SAX InputSource. | |||||||||||
Create a
SAXSource , using a SAX InputSource . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the SAX InputSource to be used for the Source.
| |||||||||||
Get the base ID (URI or system ID) from where URIs will be resolved. | |||||||||||
Get the XMLReader to be used for the Source.
| |||||||||||
Set the SAX InputSource to be used for the Source.
| |||||||||||
Set the system identifier for this Source.
| |||||||||||
Set the XMLReader to be used for the Source.
| |||||||||||
Attempt to obtain a SAX InputSource object from a Source
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface javax.xml.transform.Source
|
If getFeature(String)
returns true when passed this value as an argument,
the Transformer supports Source input of this type.
Zero-argument default constructor. If this constructor is used, and
no SAX source is set using
setInputSource(InputSource)
, then the
Transformer
will
create an empty source InputSource
using
new InputSource()
.
Create a SAXSource
, using an XMLReader
and a SAX InputSource. The Transformer
or SAXTransformerFactory
will set itself
to be the reader's ContentHandler
, and then will call
reader.parse(inputSource).
reader | An XMLReader to be used for the parse. |
---|---|
inputSource | A SAX input source reference that must be non-null and that will be passed to the reader parse method. |
Create a SAXSource
, using a SAX InputSource
.
The Transformer
or
SAXTransformerFactory
creates a
reader via XMLReaderFactory
(if setXMLReader is not used), sets itself as
the reader's ContentHandler
, and calls
reader.parse(inputSource).
inputSource | An input source reference that must be non-null and that will be passed to the parse method of the reader. |
---|
Get the SAX InputSource to be used for the Source.
Get the base ID (URI or system ID) from where URIs will be resolved.
Source
, or null
.
Get the XMLReader to be used for the Source.
Set the SAX InputSource to be used for the Source.
inputSource | A valid InputSource reference. |
---|
Set the system identifier for this Source. If an input source has already been set, it will set the system ID or that input source, otherwise it will create a new input source.
The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to open a connection to the URI only if no byte stream or character stream is specified).
systemId | The system identifier as a URI string. |
---|
Set the XMLReader to be used for the Source.
reader | A valid XMLReader or XMLFilter reference. |
---|
Attempt to obtain a SAX InputSource object from a Source object.
source | Must be a non-null Source reference. |
---|