|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xpath.SourceTreeManager
This class bottlenecks all management of source trees. The methods in this class should allow easy garbage collection of source trees (not yet!), and should centralize parsing for those source trees.
Constructor Summary | |
SourceTreeManager()
|
Method Summary | |
java.lang.String |
findURIFromDoc(Document owner)
Given a document, find the URL associated with that document. |
Node |
getDOMNode(Source source,
SourceLocator locator)
Try to create a DOM source tree from the input source. |
Node |
getNode(Source source)
Given a Source object, find the node associated with it. |
Node |
getSourceTree(Source source,
SourceLocator locator)
Get the source tree from the input source. |
Node |
getSourceTree(java.lang.String base,
java.lang.String urlString,
SourceLocator locator)
Get the source tree from the a base URL and a URL string. |
URIResolver |
getURIResolver()
Get the object that will be used to resolve URIs used in document(), etc. |
XMLReader |
getXMLReader(Source inputSource,
SourceLocator locator)
This method returns the SAX2 parser to use with the InputSource obtained from this URI. |
void |
putDocumentInCache(Node n,
Source source)
Put the source tree root node in the document cache. |
void |
reset()
Reset the list of SourceTree objects that this manager manages. |
Source |
resolveURI(java.lang.String base,
java.lang.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. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SourceTreeManager()
Method Detail |
public void reset()
public void setURIResolver(URIResolver resolver)
resolver
- An object that implements the URIResolver interface,
or null.public URIResolver getURIResolver()
public java.lang.String findURIFromDoc(Document owner)
owner
- Document that was previously processed by this liaison.public Source resolveURI(java.lang.String base, java.lang.String urlString, SourceLocator locator) throws TransformerException, java.io.IOException, TransformerException
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.public void putDocumentInCache(Node n, Source source)
n
- The node to cache.source
- The Source object to cache.public Node getNode(Source source)
source
- The Source object to act as the key.public Node getSourceTree(java.lang.String base, java.lang.String urlString, SourceLocator locator) throws TransformerException
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.public Node getSourceTree(Source source, SourceLocator locator) throws TransformerException
source
- The Source object that should identify the desired node.locator
- The location of the caller, for diagnostic purposes.public Node getDOMNode(Source source, SourceLocator locator) throws TransformerException
source
- The Source object that identifies the source node.locator
- The location of the caller, for diagnostic purposes.public XMLReader getXMLReader(Source inputSource, SourceLocator locator) throws TransformerException
inputSource
- The value returned from the URIResolver.locator
- The location of the original caller, for diagnostic purposes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |