Resolve an
InputSource from a public ID and/or a system ID.
This method can be called only while a schema is being parsed and will
resolve URIs against a dynamic
Stack of
InputSource s.
Since JING
doesn't offer a complete URI resolution contract, a
Stack is kept
for all the sources parsed while reading a schema. Keeping in mind that the
last
InputSource pushed in the
Stack can be considered to be
the "base URI" for the current resolution, full relative resolution of system
IDs can be achieved this way.
Note that this method of resolving URIs by keeping a
Stack of
processed URIs is a sort of a hack, but it mimics the internal state
of JING itself:
if URI resolution fails, the
Stack analysis is the first part to
look at.
Resolution will use the
EntityResolver specified at construction
to resolve public IDs, and then the
SourceResolver again specified at
construction to resolve the system IDs and to access the underlying byte
streams of the entities to be parsed.
Parameters: publicId - the public ID of the entity to resolve. Parameters: systemId - the system ID of the entity to resolve. a non-null InputSource instance. throws: IOException - if an I/O error occurred resolving the entity. throws: SAXException - if an XML error occurred resolving the entity. |