@Override public void endDocument() throws XPathException { if (--level == 0) { outputter.endDocument(); outputter = null; NodeInfo doc = builder.getCurrentRoot(); // add the constructed document to the result sequence append(doc, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); systemId = null; } previousAtomic = false; }
/** * Start of event stream */ @Override public void open() throws XPathException { level = 0; previousAtomic = false; super.open(); getNextReceiver().startDocument(0); }
/** * Output a comment */ public void comment(CharSequence chars, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.COMMENT, nodeSupplier(Type.COMMENT, null, chars), locationId); } nextReceiver.comment(chars, locationId, properties); }
/** * Return the complete parsed result * * @return the XML document for this JSON * @throws XPathException */ public Item getResult() throws XPathException { out.endDocument(); out.close(); return builder.getCurrentRoot(); }
/** * Create a ComplexContentOutputter * @param next the next receiver in the pipeline */ public ComplexContentOutputter(Receiver next) { super(next.getPipelineConfiguration()); setReceiver(next); setHostLanguage(next.getPipelineConfiguration().getHostLanguage()); }
public ProxyReceiver(/*@NotNull*/ Receiver nextReceiver) { super(nextReceiver.getPipelineConfiguration()); setUnderlyingReceiver(nextReceiver); setPipelineConfiguration(nextReceiver.getPipelineConfiguration()); }
/** * endElement: Discard the namespaces declared locally on this element. */ public void endElement() throws XPathException { maybeStartContent(); nextReceiver.endElement(); undeclareNamespacesForElement(); }
/** * Callback interface for SAX: not for application use */ public void endElement() throws XPathException { flush(); nextReceiver.endElement(); }
/** * Start of event stream */ public void open() throws XPathException { transition("open"); nextReceiver.open(); }
/** * Notify the start of the content, that is, the completion of all attributes and namespaces. * Note that the initial receiver of output from XSLT instructions will not receive this event, * it has to detect it itself. Note that this event is reported for every element even if it has * no attributes, no namespaces, and no content. */ public void startContent() throws XPathException { transition("startContent"); nextReceiver.startContent(); }
@Override public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { start(); super.processingInstruction(target, data, locationId, properties); }
/** * Start of a document node. */ @Override public void startDocument(int properties) throws XPathException { sep(); super.startDocument(properties); }
/** * Character data */ @Override public void characters(CharSequence chars, Location locationId, int properties) throws XPathException { sep(); super.characters(chars, locationId, properties); }
@Override public void endDocument() throws XPathException { if (--level == 0) { outputter.endDocument(); outputter = null; NodeInfo doc = builder.getCurrentRoot(); // add the constructed document to the result sequence append(doc, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); } previousAtomic = false; }
/** * Create a ComplexContentOutputter * @param next the next receiver in the pipeline */ public ComplexContentOutputter(Receiver next) { super(next.getPipelineConfiguration()); setReceiver(next); setHostLanguage(next.getPipelineConfiguration().getHostLanguage()); }
/** * Start of event stream */ @Override public void open() throws XPathException { level = 0; previousAtomic = false; super.open(); getNextReceiver().startDocument(0); }
/** * Notify the end of a document node */ public void endDocument() throws XPathException { if (--level == 0) { outputter.endDocument(); DocumentInfo doc = (DocumentInfo)builder.getCurrentRoot(); // add the constructed document to the result sequence append(doc, 0, NodeInfo.ALL_NAMESPACES); } previousAtomic = false; }