net.sf.saxon.event
public final class ComplexContentOutputter extends SequenceReceiver
The same ComplexContentOutputter may be used for generating an entire XML document; it is not necessary to create a new outputter for each element node.
Constructor Summary | |
---|---|
ComplexContentOutputter()
Create a ComplexContentOutputter |
Method Summary | |
---|---|
void | append(Item item, int locationId, int copyNamespaces)
Append an arbitrary item (node or atomic value) to the output |
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 |
boolean | contentHasBeenWritten()
Test whether any content has been written to this ComplexContentOutputter |
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 | open()
Start the output process |
void | processingInstruction(String target, CharSequence data, int locationId, int properties)
Write a processing instruction |
void | setHostLanguage(int language)
Set the host language |
void | setPipelineConfiguration(PipelineConfiguration pipe) |
void | setReceiver(Receiver receiver)
Set the receiver (to handle the next stage in the pipeline) directly |
void | startContent()
Flush out a pending start tag |
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 |
Parameters: item the item to be appended locationId the location of the calling instruction, for diagnostics copyNamespaces if the item is an element node, this indicates whether its namespaces need to be copied. Values are ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES
Parameters: nameCode The name of the attribute value The value of the attribute properties Bit fields containing properties of the attribute to be written
Throws: 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
Throws: XPathException for any failure
Returns: true if content has been written
Parameters: nscode The namespace code
Throws: 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: language the host language, for example XQUERY
Parameters: receiver the receiver to handle the next stage in the pipeline
Parameters: nameCode The element name code
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