org.apache.xpath
public class SourceTreeManager extends Object
Method Summary | |
---|---|
String | findURIFromDoc(int owner)
Given a document, find the URL associated with that document. |
int | getNode(Source source)
Given a Source object, find the node associated with it.
|
int | getSourceTree(String base, String urlString, SourceLocator locator, XPathContext xctxt)
Get the source tree from the a base URL and a URL string.
|
int | getSourceTree(Source source, SourceLocator locator, XPathContext xctxt)
Get the source tree from the input source.
|
URIResolver | getURIResolver()
Get the object that will be used to resolve URIs used in
document(), etc. |
static XMLReader | getXMLReader(Source inputSource, SourceLocator locator)
This method returns the SAX2 parser to use with the InputSource
obtained from this URI.
|
int | parseToNode(Source source, SourceLocator locator, XPathContext xctxt)
Try to create a DOM source tree from the input source.
|
void | putDocumentInCache(int n, Source source)
Put the source tree root node in the document cache.
|
void | removeDocumentFromCache(int n) JJK: Support |
void | reset()
Reset the list of SourceTree objects that this manager manages.
|
Source | resolveURI(String base, String urlString, SourceLocator locator)
This will be called by the processor when it encounters
an xsl:include, xsl:import, or document() function.
|
void | setURIResolver(URIResolver resolver)
Set an object that will be used to resolve URIs used in
document(), etc. |
Parameters: owner Document that was previously processed by this liaison.
Returns: The base URI of the owner argument.
Parameters: source The Source object to act as the key.
Returns: The node that is associated with the Source, or null if not found.
Parameters: base The base URI to use if the urlString is relative. urlString An absolute or relative URL string. locator The location of the caller, for diagnostic purposes.
Returns: should be a non-null reference to the node identified by the base and urlString.
Throws: TransformerException If the URL can not resolve to a node.
Parameters: source The Source object that should identify the desired node. locator The location of the caller, for diagnostic purposes.
Returns: non-null reference to a node.
Throws: TransformerException if the Source argument can't be resolved to a node.
Returns: An object that implements the URIResolver interface, or null.
Parameters: inputSource The value returned from the URIResolver. locator The location of the original caller, for diagnostic purposes.
Returns: a SAX2 XMLReader to use to resolve the inputSource argument.
Throws: TransformerException if the reader can not be created.
Parameters: source The Source object that identifies the source node. locator The location of the caller, for diagnostic purposes.
Returns: non-null reference to node identified by the source argument.
Throws: TransformerException if the source argument can not be resolved to a source node.
Parameters: n The node to cache. source The Source object to cache.
Parameters: n The node to remove.
Parameters: base The base URI that should be used. urlString Value from an xsl:import or xsl:include's href attribute, or a URI specified in the document() function.
Returns: a Source that can be used to process the resource.
Throws: IOException TransformerException
Parameters: resolver An object that implements the URIResolver interface, or null.