/** * Append an item to the sequence, performing any necessary type-checking and conversion */ public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { if (this.locationId == null) { this.locationId = locationId; } super.append(item, locationId, copyNamespaces); }
/** * Append an item to the sequence, performing any necessary type-checking and conversion */ public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { if (this.locationId == null) { this.locationId = locationId; } super.append(item, locationId, copyNamespaces); }
/** * Append an item to the sequence, performing any necessary type-checking and conversion */ public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { if (this.locationId == null) { this.locationId = locationId; } super.append(item, locationId, copyNamespaces); }
/** * Append an item to the sequence, performing any necessary type-checking and conversion */ public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { if (this.locationId == null) { this.locationId = locationId; } super.append(item, locationId, copyNamespaces); }
@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; }
@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; }
/** * 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; }
/** * 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; }
/** * Output an element end tag. */ public void endElement() throws XPathException { if (inStartTag) { startContent(); } outputter.endElement(); if (--level == 0) { NodeInfo element = builder.getCurrentRoot(); append(element, 0, NodeInfo.ALL_NAMESPACES); } previousAtomic = false; }
@Override public void endElement() throws XPathException { if (inStartTag) { startContent(); } //System.err.println("SEQUENCE_WRITER endElement " + this); outputter.endElement(); if (--level == 0) { outputter.close(); outputter = null; NodeInfo element = builder.getCurrentRoot(); append(element, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); systemId = null; } previousAtomic = false; }
@Override public void endElement() throws XPathException { if (inStartTag) { startContent(); } //System.err.println("SEQUENCE_WRITER endElement " + this); outputter.endElement(); if (--level == 0) { outputter.close(); outputter = null; NodeInfo element = builder.getCurrentRoot(); append(element, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); } previousAtomic = false; }
/** * Output an element end tag. */ public void endElement() throws XPathException { if (inStartTag) { startContent(); } outputter.endElement(); if (--level == 0) { outputter.close(); NodeInfo element = builder.getCurrentRoot(); append(element, 0, NodeInfo.ALL_NAMESPACES); } previousAtomic = false; }
/** * Write a comment. */ public void comment(CharSequence comment, int locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.COMMENT); o.setStringValue(comment); append(o, locationId, NodeInfo.ALL_NAMESPACES); } else { outputter.comment(comment, locationId, properties); } previousAtomic = false; }
/** * Write a comment. */ public void comment(CharSequence comment, int locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.COMMENT); o.setStringValue(comment); append(o, locationId, NodeInfo.ALL_NAMESPACES); } else { outputter.comment(comment, locationId, properties); } previousAtomic = false; }
@Override public void attribute(NodeName attName, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.ATTRIBUTE); o.setNodeName(attName); o.setStringValue(value); o.setTypeAnnotation(typeCode); append(o, locationId, ReceiverOptions.ALL_NAMESPACES); } else { outputter.attribute(attName, typeCode, value, locationId, properties); } previousAtomic = false; }
@Override public void attribute(NodeName attName, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.ATTRIBUTE); o.setNodeName(attName); o.setStringValue(value); o.setTypeAnnotation(typeCode); append(o, locationId, ReceiverOptions.ALL_NAMESPACES); } else { outputter.attribute(attName, typeCode, value, locationId, properties); } previousAtomic = false; }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { if (level == 0) { for (NamespaceBinding ns : namespaceBindings) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.NAMESPACE); o.setNodeName(new NoNamespaceName(ns.getPrefix())); o.setStringValue(ns.getURI()); append(o, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); } } else { outputter.namespace(namespaceBindings, properties); } previousAtomic = false; }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { if (level == 0) { for (NamespaceBinding ns : namespaceBindings) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.NAMESPACE); o.setNodeName(new NoNamespaceName(ns.getPrefix())); o.setStringValue(ns.getURI()); append(o, ExplicitLocation.UNKNOWN_LOCATION, ReceiverOptions.ALL_NAMESPACES); } } else { outputter.namespace(namespaceBindings, properties); } previousAtomic = false; }
/** * Write a processing instruction * No-op in this implementation */ public void processingInstruction(String target, CharSequence data, int locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNameCode(getNamePool().allocate("", "", target)); o.setNodeKind(Type.PROCESSING_INSTRUCTION); o.setStringValue(data); append(o, locationId, NodeInfo.ALL_NAMESPACES); } else { outputter.processingInstruction(target, data, locationId, properties); } previousAtomic = false; }
/** * Write a processing instruction * No-op in this implementation */ public void processingInstruction(String target, CharSequence data, int locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNameCode(getNamePool().allocate("", "", target)); o.setNodeKind(Type.PROCESSING_INSTRUCTION); o.setStringValue(data); append(o, locationId, NodeInfo.ALL_NAMESPACES); } else { outputter.processingInstruction(target, data, locationId, properties); } previousAtomic = false; }