watchdog.addTemporaryFragment(targetDoc.getFileURI());
	public DocumentImpl storeTemporaryDoc(org.exist.memtree.DocumentImpl doc) throws XPathException {		try {			DocumentImpl targetDoc = broker.storeTempResource(doc);            if (targetDoc == null)                throw new XPathException("Internal error: failed to store temporary doc fragment");			watchdog.addTemporaryFragment(targetDoc.getFileURI());            LOG.debug("Stored: " + targetDoc.getDocId() + ": " + targetDoc.getURI());			return targetDoc;		} catch (EXistException e) {			throw new XPathException(TEMP_STORE_ERROR, e);		} catch (PermissionDeniedException e) {			throw new XPathException(TEMP_STORE_ERROR, e);		} catch (LockException e) {			throw new XPathException(TEMP_STORE_ERROR, e);		}	}