/** * Output the separator, assuming we are at the top level and not at the start */ public void sep() throws XPathException { if (level == 0 && !first) { super.characters(separator, ExplicitLocation.UNKNOWN_LOCATION, 0); } else { first = false; } } }
/** * End of output. Note that closing this receiver also closes the rest of the * pipeline. */ @Override public void close() throws XPathException { //getNextReceiver().endDocument(); super.close(); }
/** * Output a comment */ @Override public void comment(CharSequence chars, Location locationId, int properties) throws XPathException { sep(); super.comment(chars, locationId, properties); }
/** * Character data */ @Override public void characters(CharSequence chars, Location locationId, int properties) throws XPathException { try { maybeStartContent(); super.characters(chars, locationId, properties); previousAtomic = false; } catch (XPathException e) { failed = true; throw e; } }
sn.setSystemId(systemId); sn.onClose(helper.getListeners()); return sn;
/** * Start of event stream */ @Override public void open() throws XPathException { level = 0; previousAtomic = false; super.open(); getNextReceiver().startDocument(0); }
if (helper.getListeners() != null) { if (target instanceof SequenceNormalizer) { ((SequenceNormalizer)target).onClose(helper.getListeners()); } else { target = new CloseNotifier(target, helper.getListeners());
/** * Start of event stream */ @Override public void open() throws XPathException { first = true; super.open(); }
/** * Processing Instruction */ @Override public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { sep(); super.processingInstruction(target, data, locationId, properties); }
private void maybeStartContent() throws XPathException { if (inStartTag) { startContent(); } }
/** * Output a comment */ @Override public void comment(CharSequence chars, Location locationId, int properties) throws XPathException { try { maybeStartContent(); super.comment(chars, locationId, properties); previousAtomic = false; } catch (XPathException e) { failed = true; throw e; } }
sn.setSystemId(systemId); sn.onClose(helper.getListeners()); return sn;
/** * Start of event stream */ @Override public void open() throws XPathException { level = 0; previousAtomic = false; super.open(); getNextReceiver().startDocument(0); }
if (helper.getListeners() != null) { if (target instanceof SequenceNormalizer) { ((SequenceNormalizer)target).onClose(helper.getListeners()); } else { target = new CloseNotifier(target, helper.getListeners());
/** * Start of event stream */ @Override public void open() throws XPathException { first = true; super.open(); }
/** * Processing Instruction */ @Override public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { sep(); super.processingInstruction(target, data, locationId, properties); }
private void maybeStartContent() throws XPathException { if (inStartTag) { startContent(); } }
/** * Processing Instruction */ @Override public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { try { maybeStartContent(); super.processingInstruction(target, data, locationId, properties); previousAtomic = false; } catch (XPathException e) { failed = true; throw e; } }
/** * Output the separator, assuming we are at the top level and not at the start */ public void sep() throws XPathException { if (level == 0 && !first) { super.characters(separator, ExplicitLocation.UNKNOWN_LOCATION, 0); } else { first = false; } } }
/** * End of output. Note that closing this receiver also closes the rest of the * pipeline. */ @Override public void close() throws XPathException { if (failed) { super.close(); } else { getNextReceiver().endDocument(); super.close(); try { if (actionList != null) { for (Action action : actionList) { action.act(); } } } catch (SaxonApiException e) { throw XPathException.makeXPathException(e); } } }