/** * Get the source tree from the input source. * * @param source The Source object that should identify the desired node. * @param locator The location of the caller, for diagnostic purposes. * * @return non-null reference to a node. * * @throws TransformerException if the Source argument can't be resolved to * a node. */ public int getSourceTree(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { int n = getNode(source); if (DTM.NULL != n) return n; n = parseToNode(source, locator, xctxt); if (DTM.NULL != n) putDocumentInCache(n, source); return n; }
try source = treeMgr.resolveURI(base, uri, xctxt.getSAXLocator()); newDoc = treeMgr.getNode(source); try source = treeMgr.resolveURI(base, uri, xctxt.getSAXLocator()); newDoc = treeMgr.getSourceTree(source, xctxt.getSAXLocator(), xctxt);
/** * Get an object that will be used to resolve URIs used in * document(), etc. * * @return An object that implements the URIResolver interface, * or null. */ public URIResolver getURIResolver() { return m_xcontext.getSourceTreeManager().getURIResolver(); }
Source source = this.resolveURI(base, urlString, locator); return getSourceTree(source, locator, xctxt);
/** * Set an object that will be used to resolve URIs used in * document(), etc. * @param resolver An object that implements the URIResolver interface, * or null. */ public void setURIResolver(URIResolver resolver) { synchronized (m_reentryGuard) { m_xcontext.getSourceTreeManager().setURIResolver(resolver); } }
/** * Put the source tree root node in the document cache. * TODO: This function needs to be a LOT more sophisticated. * * @param n The node to cache. * @param source The Source object to cache. */ public void putDocumentInCache(int n, Source source) { int cachedNode = getNode(source); if (DTM.NULL != cachedNode) { if (!(cachedNode == n)) throw new RuntimeException( "Programmer's Error! " + "putDocumentInCache found reparse of doc: " + source.getSystemId()); return; } if (null != source.getSystemId()) { m_sourceTree.addElement(new SourceTree(n, source.getSystemId())); } }
m_xcontext.getSourceTreeManager().reset();
xctxt.getSourceTreeManager().removeDocumentFromCache(dtm.getDocument()); xctxt.release(dtm,false);
Source source = this.resolveURI(base, urlString, locator); return getSourceTree(source, locator, xctxt);
/** * Set an object that will be used to resolve URIs used in * document(), etc. * @param resolver An object that implements the URIResolver interface, * or null. */ public void setURIResolver(URIResolver resolver) { synchronized (m_reentryGuard) { m_xcontext.getSourceTreeManager().setURIResolver(resolver); } }
/** * Put the source tree root node in the document cache. * TODO: This function needs to be a LOT more sophisticated. * * @param n The node to cache. * @param source The Source object to cache. */ public void putDocumentInCache(int n, Source source) { int cachedNode = getNode(source); if (DTM.NULL != cachedNode) { if (!(cachedNode == n)) throw new RuntimeException( "Programmer's Error! " + "putDocumentInCache found reparse of doc: " + source.getSystemId()); return; } if (null != source.getSystemId()) { m_sourceTree.addElement(new SourceTree(n, source.getSystemId())); } }
m_xcontext.getSourceTreeManager().reset();
xctxt.getSourceTreeManager().removeDocumentFromCache(dtm.getDocument()); xctxt.release(dtm,false);
/** * Get the source tree from the input source. * * @param source The Source object that should identify the desired node. * @param locator The location of the caller, for diagnostic purposes. * * @return non-null reference to a node. * * @throws TransformerException if the Source argument can't be resolved to * a node. */ public int getSourceTree(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { int n = getNode(source); if (DTM.NULL != n) return n; n = parseToNode(source, locator, xctxt); if (DTM.NULL != n) putDocumentInCache(n, source); return n; }
try source = treeMgr.resolveURI(base, uri, xctxt.getSAXLocator()); newDoc = treeMgr.getNode(source); try source = treeMgr.resolveURI(base, uri, xctxt.getSAXLocator()); newDoc = treeMgr.getSourceTree(source, xctxt.getSAXLocator(), xctxt);
Source source = this.resolveURI(base, urlString, locator); return getSourceTree(source, locator, xctxt);
/** * Get an object that will be used to resolve URIs used in * document(), etc. * * @return An object that implements the URIResolver interface, * or null. */ public URIResolver getURIResolver() { return m_xcontext.getSourceTreeManager().getURIResolver(); }
/** * Set an object that will be used to resolve URIs used in * document(), etc. * @param resolver An object that implements the URIResolver interface, * or null. */ public void setURIResolver(URIResolver resolver) { synchronized (m_reentryGuard) { m_xcontext.getSourceTreeManager().setURIResolver(resolver); } }
/** * Put the source tree root node in the document cache. * TODO: This function needs to be a LOT more sophisticated. * * @param n The node to cache. * @param source The Source object to cache. */ public void putDocumentInCache(int n, Source source) { int cachedNode = getNode(source); if (DTM.NULL != cachedNode) { if (!(cachedNode == n)) throw new RuntimeException( "Programmer's Error! " + "putDocumentInCache found reparse of doc: " + source.getSystemId()); return; } if (null != source.getSystemId()) { m_sourceTree.addElement(new SourceTree(n, source.getSystemId())); } }
m_xcontext.getSourceTreeManager().reset();