public void bulkCopyElementNode(TinyElementImpl node, int copyOptions) throws XPathException { if (inStartTag) { startContent(); } ((ComplexContentOutputter) outputter).bulkCopyElementNode(node, copyOptions); }
public void graftElementNode(TinyElementImpl node, int copyOptions) throws XPathException { if (inStartTag) { startContent(); } ((ComplexContentOutputter) outputter).graftElementNode(node, copyOptions); } }
@Override public void startElement(NodeName elemName, SchemaType typeCode, Location location, int properties) throws XPathException { if (inStartTag) { startContent(); } if (outputter == null) { createTree((properties & ReceiverOptions.MUTABLE_TREE) != 0); } //System.err.println("SEQUENCE_WRITER startElement " + this); outputter.startElement(elemName, typeCode, location, properties); level++; inStartTag = true; previousAtomic = false; }
@Override public void startElement(NodeName elemName, SchemaType typeCode, Location location, int properties) throws XPathException { if (inStartTag) { startContent(); } if (outputter == null) { createTree((properties & ReceiverOptions.MUTABLE_TREE) != 0); } //System.err.println("SEQUENCE_WRITER startElement " + this); outputter.startElement(elemName, typeCode, location, properties); level++; inStartTag = true; previousAtomic = false; }
/** * Output an element start tag. * @param nameCode The element name code - a code held in the Name Pool * @param typeCode Integer code identifying the type of this element. Zero identifies the default * type, that is xs:anyType * @param properties bit-significant flags indicating any special information */ public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (outputter==null) { createTree(); } outputter.startElement(nameCode, typeCode, locationId, properties); level++; inStartTag = true; previousAtomic = false; }
/** * Output an element start tag. * @param nameCode The element name code - a code held in the Name Pool * @param typeCode Integer code identifying the type of this element. Zero identifies the default * type, that is xs:anyType * @param properties bit-significant flags indicating any special information */ public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (outputter==null) { createTree(); } outputter.startElement(nameCode, typeCode, locationId, properties); level++; inStartTag = true; 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 characters(CharSequence s, Location locationId, int properties) throws XPathException { if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.TEXT); o.setStringValue(s.toString()); write(o); } else { if (s.length() > 0) { if (inStartTag) { startContent(); } outputter.characters(s, locationId, properties); } } previousAtomic = false; }
@Override public void characters(CharSequence s, Location locationId, int properties) throws XPathException { if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.TEXT); o.setStringValue(s.toString()); write(o); } else { if (s.length() > 0) { if (inStartTag) { startContent(); } outputter.characters(s, locationId, properties); } } 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; }
@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; }
@Override public void comment(CharSequence comment, Location locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.COMMENT); o.setStringValue(comment); write(o); } else { outputter.comment(comment, locationId, properties); } previousAtomic = false; }
@Override public void comment(CharSequence comment, Location locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeKind(Type.COMMENT); o.setStringValue(comment); write(o); } 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; }
/** * 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 processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeName(new NoNamespaceName(target)); o.setNodeKind(Type.PROCESSING_INSTRUCTION); o.setStringValue(data); write(o); } else { outputter.processingInstruction(target, data, locationId, properties); } previousAtomic = false; }
@Override public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { if (inStartTag) { startContent(); } if (level == 0) { Orphan o = new Orphan(getConfiguration()); o.setNodeName(new NoNamespaceName(target)); o.setNodeKind(Type.PROCESSING_INSTRUCTION); o.setStringValue(data); write(o); } 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; }
/** * 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; }