public void reset() { super.reset(); currentNode = null; nodeFactory = DefaultNodeFactory.THE_INSTANCE; depth = 0; allocateSequenceNumbers = true; nextNodeNumber = 1; }
public void reset() { super.reset(); currentNode = null; nodeFactory = null; depth = 0; allocateSequenceNumbers = true; nextNodeNumber = 1; }
public void reset() { super.reset(); currentNode = null; nodeFactory = DefaultNodeFactory.THE_INSTANCE; depth = 0; allocateSequenceNumbers = true; nextNodeNumber = 1; }
public void reset() { super.reset(); tree = null; currentDepth = 0; nodeNr = 0; ended = false; sizeParameters = null; }
public void reset() { super.reset(); tree = null; currentDepth = 0; nodeNr = 0; ended = false; statistics = Statistics.TEMPORARY_TREE_STATISTICS; }
public void reset() { super.reset(); tree = null; currentDepth = 0; nodeNr = 0; ended = false; sizeParameters = null; }
public void reset() { super.reset(); currentNode = null; nodeFactory = null; depth = 0; nextNodeNumber = 1; }
public void reset() { super.reset(); tree = null; currentDepth = 0; nodeNr = 0; ended = false; sizeParameters = null; }
public void reset() { super.reset(); currentNode = null; nodeFactory = null; depth = 0; nextNodeNumber = 1; }
public void reset() { super.reset(); tree = null; currentDepth = 0; nodeNr = 0; ended = false; statistics = config.getTreeStatistics().TEMPORARY_TREE_STATISTICS; }
/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); DocumentInfo doc = (DocumentInfo)builder.getCurrentRoot(); builder.reset(); if (doc==null) { throw new SAXException("No source document has been built"); } try { controller.transformDocument(doc, result); } catch (TransformerException err) { if (err instanceof XPathException) { controller.reportFatalError((XPathException)err); } throw new SAXException(err); } }
/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); NodeInfo doc = builder.getCurrentRoot(); doc.getTreeInfo().setSpaceStrippingRule( transformer.getUnderlyingXsltTransformer().getUnderlyingController().getSpaceStrippingRule()); builder.reset(); if (doc == null) { throw new SAXException("No source document has been built"); } try { transformer.transform(doc, result); } catch (TransformerException err) { throw new SAXException(err); } }
/** * Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off * the transformation of the constructed document */ public void endDocument() throws SAXException { super.endDocument(); NodeInfo doc = builder.getCurrentRoot(); doc.getTreeInfo().setSpaceStrippingRule( transformer.getUnderlyingXsltTransformer().getUnderlyingController().getSpaceStrippingRule()); builder.reset(); if (doc == null) { throw new SAXException("No source document has been built"); } try { transformer.transform(doc, result); } catch (TransformerException err) { throw new SAXException(err); } }
/** * Override the behaviour of endDocument() in ProxyReceiver, so that it fires off * the transformation of the constructed document */ public void close() throws XPathException { nextReceiver.close(); DocumentInfo doc = (DocumentInfo)builder.getCurrentRoot(); builder.reset(); if (doc==null) { throw new XPathException("No source document has been built"); } //doc.getNamePool().allocateDocumentNumber(doc); try { controller.transformDocument(doc, result); } catch (TransformerException e) { throw XPathException.makeXPathException(e); } }
/** * Evaluate in a general context */ public Item evaluateItem(XPathContext c) throws XPathException { Controller controller = c.getController(); AtomicValue content = (AtomicValue)argument[0].evaluateItem(c); StringReader sr = new StringReader(content.getStringValue()); InputSource is = new InputSource(sr); is.setSystemId(baseURI); Source source = new SAXSource(is); source.setSystemId(baseURI); Builder b = controller.makeBuilder(); Receiver s = b; source = AugmentedSource.makeAugmentedSource(source); ((AugmentedSource)source).setStripSpace(Whitespace.XSLT); if (controller.getExecutable().stripsInputTypeAnnotations()) { s = controller.getConfiguration().getAnnotationStripper(s); } try { new Sender(controller.makePipelineConfiguration()).send(source, s); NodeInfo node = b.getCurrentRoot(); b.reset(); return node; } catch (XPathException err) { throw new XPathException(err); } }
Sender.send(source, b, options); newdoc = b.getCurrentRoot().getTreeInfo(); b.reset(); } finally { if (options.isPleaseCloseAfterUse()) {
Sender.send(source, b, options); newdoc = b.getCurrentRoot().getTreeInfo(); b.reset(); } finally { if (options.isPleaseCloseAfterUse()) {
/** * Override the behaviour of close() in ProxyReceiver, so that it fires off * the transformation of the constructed document */ public void close() throws XPathException { if (builder == null) { // already closed } else { nextReceiver.close(); NodeInfo doc = builder.getCurrentRoot(); builder.reset(); builder = null; if (doc == null) { throw new XPathException("No source document has been built"); } doc.getTreeInfo().setSpaceStrippingRule(controller.getSpaceStrippingRule()); if (destination == null) { throw new XPathException("No output destination has been supplied"); } try { controller.setGlobalContextItem(doc); controller.applyTemplates(doc, destination); } catch (TransformerException e) { throw XPathException.makeXPathException(e); } } }
/** * Override the behaviour of close() in ProxyReceiver, so that it fires off * the transformation of the constructed document */ public void close() throws XPathException { if (builder == null) { // already closed } else { nextReceiver.close(); NodeInfo doc = builder.getCurrentRoot(); builder.reset(); builder = null; if (doc == null) { throw new XPathException("No source document has been built"); } doc.getTreeInfo().setSpaceStrippingRule(controller.getSpaceStrippingRule()); if (destination == null) { throw new XPathException("No output destination has been supplied"); } try { controller.setGlobalContextItem(doc); controller.applyTemplates(doc, destination); } catch (TransformerException e) { throw XPathException.makeXPathException(e); } } }
node.setBaseURI(baseURI); node.getTreeInfo().setUserData("saxon:document-uri", ""); b.reset(); return node; } catch (XPathException err) {