net.sf.saxon.event
public abstract class SequenceWriter extends SequenceReceiver
This class is not used to build temporary trees. For that, the ComplexContentOutputter is used.
Method Summary | |
---|---|
protected boolean | adviseReuse()
Decide whether reuse of the SequenceWriter is advisable |
void | append(Item item, int locationId, int copyNamespaces)
Append an item to the sequence, performing any necessary type-checking and conversion |
void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
Output an attribute value. |
void | characters(CharSequence s, int locationId, int properties)
Produce text content output. |
void | close()
Close the output |
void | comment(CharSequence comment, int locationId, int properties)
Write a comment. |
void | endDocument()
Notify the end of a document node |
void | endElement()
Output an element end tag. |
void | namespace(int nscode, int properties)
Output a namespace declaration. |
void | processingInstruction(String target, CharSequence data, int locationId, int properties)
Write a processing instruction
No-op in this implementation |
void | startContent()
The startContent() event is notified after all namespaces and attributes of an element
have been notified, and before any child nodes are notified. |
void | startDocument(int properties)
Start of a document node. |
void | startElement(int nameCode, int typeCode, int locationId, int properties)
Output an element start tag. |
boolean | usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events |
abstract void | write(Item item)
Abstract method to be supplied by subclasses: output one item in the sequence. |
Returns: true if reuse is considered advisable
Parameters: nameCode An integer code representing the name of the attribute, as held in the Name Pool typeCode Integer code identifying the type annotation of the attribute; zero represents the default type (xs:untypedAtomic) value The value of the attribute properties Bit significant flags for passing extra information to the serializer, e.g. to disable escaping
Throws: net.sf.saxon.trans.XPathException if there is no start tag to write to (created using writeStartTag), or if character content has been written since the start tag was written.
Parameters: s The String to be output properties bit-significant flags for extra information, e.g. disable-output-escaping
Throws: net.sf.saxon.trans.XPathException for any failure
Parameters: nscode The namespace code properties Allows special properties to be passed if required
Throws: net.sf.saxon.trans.XPathException if there is no start tag to write to (created using writeStartTag), or if character content has been written since the start tag was written.
Throws: net.sf.saxon.trans.XPathException for any failure
Parameters: nameCode The element name code - a code held in the Name Pool typeCode Integer code identifying the type of this element. Zero identifies the default type, that is xs:anyType properties bit-significant flags indicating any special information
Returns: true if the Receiver makes any use of this information. If false, the caller may supply untyped nodes instead of supplying the type annotation
Parameters: item the item to be written to the sequence