public void endDocument() { try { receiver.setSystemId("http://norman-was-here.com/"); receiver.endDocument(); receiver.close(); } catch (XPathException e) { throw new XProcException(e); } }
/** * Start of document */ public void open() throws XPathException { nextReceiver.open(); }
public void setPipelineConfiguration(/*@NotNull*/ PipelineConfiguration pipe) { if (pipelineConfiguration != pipe) { pipelineConfiguration = pipe; if (nextReceiver.getPipelineConfiguration() != pipe) { nextReceiver.setPipelineConfiguration(pipe); } } }
/** * Notify the end of the event stream */ public void close() throws XPathException { out.endElement(); // close the result:sequence element out.endDocument(); out.close(); }
public void onGroupStart(int groupNumber) throws XPathException { out.startElement(groupName, groupType, ExplicitLocation.UNKNOWN_LOCATION, 0); out.attribute(groupNrName, groupNrType, "" + groupNumber, ExplicitLocation.UNKNOWN_LOCATION, 0); out.startContent(); }
/** * Output a comment */ public void comment(CharSequence chars, Location locationId, int properties) throws XPathException { if (depth == 0) { out.startElement(resultComment, Untyped.getInstance(), ExplicitLocation.UNKNOWN_LOCATION, 0); out.startContent(); out.comment(chars, locationId, properties); out.endElement(); } else { out.comment(chars, locationId, properties); } }
public FixedSysidReceiver(Receiver wrapped, String sysid) { mySysid = sysid; myWrapped = wrapped; myWrapped.setSystemId(sysid); }
@Override public void replay(Receiver out) throws XPathException { out.characters(content, location, properties); } }
@Override public void replay(Receiver out) throws XPathException { out.comment(content, location, properties); } }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, int locationId, int properties) throws XPathException { reciever.attribute(nameCode, typeCode, value, locationId, properties); }
/** * End of event sequence */ public void close() throws XPathException { if (nextReceiver != null) { nextReceiver.close(); } previousAtomic = false; }
public void setPipelineConfiguration(/*@NotNull*/ PipelineConfiguration pipe) { if (pipelineConfiguration != pipe) { pipelineConfiguration = pipe; if (nextReceiver != null) { nextReceiver.setPipelineConfiguration(pipe); } } }
/** * Notify the end of a document node */ public void endDocument() throws XPathException { out.endElement(); depth--; }
public TeeOutputter(Receiver seq1, Receiver seq2) { super(seq1.getPipelineConfiguration()); this.seq1 = seq1; this.seq2 = seq2; }
/** * 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(); }
/** * Copy the input to the output. This method will open the output Receiver before appending to * it, and will close it afterwards. * * @throws XPathException if, for example, the input is not well-formed */ public void copy() throws XPathException { out.open(); PullPushTee tee = new PullPushTee(in, out); new PullConsumer(tee).consume(); out.close(); }
/** * Notify the end of a document node */ public void endDocument() throws XPathException { nextReceiver.endDocument(); }
/** * Notify the end of the event stream */ public void close() throws XPathException { out.endElement(); // close the result:sequence element out.endDocument(); out.close(); }
@Override public void setSystemId(String sysid) { // propagate it to the wrapped receiver, but do not take it into account here... myWrapped.setSystemId(sysid); }
/** * Character data */ public void characters(CharSequence chars, Location locationId, int properties) throws XPathException { if (depthOfHole == 0) { nextReceiver.characters(chars, locationId, properties); } }