| java.lang.Object net.sf.saxon.event.SequenceReceiver net.sf.saxon.event.ComplexContentOutputter
ComplexContentOutputter | final public class ComplexContentOutputter extends SequenceReceiver (Code) | | This class is used for generating complex content, that is, the content of an
element or document node. It enforces the rules on the order of events within
complex content (attributes and namespaces must come first), and it implements
part of the namespace fixup rules, in particular, it ensures that there is a
namespace node for the namespace used in the element name and in each attribute
name.
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.
author: Michael H. Kay |
Method Summary | |
public void | append(Item item, int locationId, int copyNamespaces) | public void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) Output an attribute value. | public void | characters(CharSequence s, int locationId, int properties) Produce text content output. | public void | close() | public void | comment(CharSequence comment, int locationId, int properties) | public void | endDocument() | public void | endElement() Output an element end tag. | public NamePool | getNamePool() | public String | getSystemId() | public void | namespace(int nscode, int properties) Output a namespace declaration. | public void | open() | public void | processingInstruction(String target, CharSequence data, int locationId, int properties) | public void | setPipelineConfiguration(PipelineConfiguration pipelineConfiguration) | public void | setReceiver(Receiver receiver) | public void | setSystemId(String systemId) | public void | startContent() | public void | startDocument(int properties) Start of a document node. | public void | startElement(int nameCode, int typeCode, int locationId, int properties) Output an element start tag. |
ComplexContentOutputter | public ComplexContentOutputter()(Code) | | |
append | public void append(Item item, int locationId, int copyNamespaces) throws XPathException(Code) | | Append an arbitrary item (node or atomic value) to the output
Parameters: item - the item to be appended Parameters: locationId - the location of the calling instruction, for diagnostics Parameters: copyNamespaces - if the item is an element node, this indicates whether its namespaces |
attribute | public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException(Code) | | Output an attribute value.
This is added to a list of pending attributes for the current start tag, overwriting
any previous attribute with the same name.
This method should NOT be used to output namespace declarations.
Parameters: nameCode - The name of the attribute Parameters: value - The value of the attribute Parameters: 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. |
characters | public void characters(CharSequence s, int locationId, int properties) throws XPathException(Code) | | Produce text content output.
Special characters are escaped using XML/HTML conventions if the output format
requires it.
Parameters: s - The String to be output exception: XPathException - for any failure |
namespace | public void namespace(int nscode, int properties) throws XPathException(Code) | | Output a namespace declaration.
This is added to a list of pending namespaces for the current start tag.
If there is already another declaration of the same prefix, this one is
ignored, unless the REJECT_DUPLICATES flag is set, in which case this is an error.
Note that unlike SAX2 startPrefixMapping(), this call is made AFTER writing the start tag.
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. |
setReceiver | public void setReceiver(Receiver receiver)(Code) | | Set the receiver (to handle the next stage in the pipeline) directly
|
startDocument | public void startDocument(int properties) throws XPathException(Code) | | Start of a document node.
|
startElement | public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException(Code) | | Output an element start tag.
The actual output of the tag is deferred until all attributes have been output
using attribute().
Parameters: nameCode - The element name code |
|
|