public boolean docAvailable(String href, XPathContext context) { try { PackageData packageData = getRetainedStaticContext().getPackageData(); DocumentURI documentKey = DocumentFn.computeDocumentKey(href, getStaticBaseUriString(), packageData, context); DocumentPool pool = context.getController().getDocumentPool(); if (pool.isMarkedUnavailable(documentKey)) { return false; } TreeInfo doc = pool.find(documentKey); if (doc != null) { return true; } Item item = DocumentFn.makeDoc(href, getStaticBaseUriString(), packageData, null, context, null, true); if (item != null) { return true; } else { // The document does not exist; ensure that this remains the case pool.markUnavailable(documentKey); return false; } } catch (XPathException e) { return false; } }
public boolean docAvailable(String href, XPathContext context) { try { PackageData packageData = getRetainedStaticContext().getPackageData(); DocumentURI documentKey = DocumentFn.computeDocumentKey(href, getStaticBaseUriString(), packageData, context); DocumentPool pool = context.getController().getDocumentPool(); if (pool.isMarkedUnavailable(documentKey)) { return false; } TreeInfo doc = pool.find(documentKey); if (doc != null) { return true; } Item item = DocumentFn.makeDoc(href, getStaticBaseUriString(), packageData, null, context, null, true); if (item != null) { return true; } else { // The document does not exist; ensure that this remains the case pool.markUnavailable(documentKey); return false; } } catch (XPathException e) { return false; } }
if (pool.isMarkedUnavailable(documentKey)) { XPathException err = new XPathException( "Document has been marked not available: " + documentKey);
if (pool.isMarkedUnavailable(documentKey)) { XPathException err = new XPathException( "Document has been marked not available: " + documentKey);