|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.event.Outputter | +--net.sf.saxon.event.ComplexContentOutputter
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.
Field Summary |
Fields inherited from class net.sf.saxon.event.Outputter |
previousAtomic |
Fields inherited from interface javax.xml.transform.Result |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
ComplexContentOutputter()
|
Method Summary | |
void |
append(Item item)
Append an arbitrary item (node or atomic value) to the output |
void |
attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int properties)
Output an attribute value. |
void |
characters(java.lang.CharSequence s,
int properties)
Produce text content output. |
void |
comment(java.lang.CharSequence comment,
int properties)
Write a comment |
void |
endDocument()
Close the output |
void |
endElement()
Output an element end tag. |
NamePool |
getNamePool()
Get the namePool in which all name codes can be found |
java.lang.String |
getSystemId()
|
void |
namespace(int nscode,
int properties)
Output a namespace declaration. |
void |
processingInstruction(java.lang.String target,
java.lang.CharSequence data,
int properties)
Write a processing instruction |
void |
setNamePool(NamePool pool)
Set the namePool in which all name codes can be found |
void |
setReceiver(Receiver receiver)
Set the receiver (to handle the next stage in the pipeline) directly |
void |
setSystemId(java.lang.String systemId)
Set the System ID of the destination tree |
void |
startContent()
Flush out a pending start tag |
void |
startDocument()
Start the output process |
void |
startElement(int nameCode,
int typeCode,
int properties)
Output an element start tag. |
Methods inherited from class net.sf.saxon.event.Outputter |
setDocumentLocator, setUnparsedEntity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ComplexContentOutputter()
Method Detail |
public void setNamePool(NamePool pool)
Receiver
setNamePool
in interface Receiver
setNamePool
in class Outputter
public NamePool getNamePool()
Receiver
getNamePool
in interface Receiver
getNamePool
in class Outputter
public void setSystemId(java.lang.String systemId)
Receiver
setSystemId
in interface Receiver
setSystemId
in class Outputter
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Result
getSystemId
in class Outputter
public void setReceiver(Receiver receiver)
public void startDocument() throws javax.xml.transform.TransformerException
startDocument
in interface Receiver
startDocument
in class Outputter
javax.xml.transform.TransformerException
public void characters(java.lang.CharSequence s, int properties) throws javax.xml.transform.TransformerException
s
- The String to be outputproperties
- Bit significant value. The following bits are defined:
javax.xml.transform.TransformerException
- for any failurepublic void startElement(int nameCode, int typeCode, int properties) throws javax.xml.transform.TransformerException
nameCode
- The element name codetypeCode
- integer code identifying the element's type within the name pool.
javax.xml.transform.TransformerException
public void namespace(int nscode, int properties) throws javax.xml.transform.TransformerException
nscode
- The namespace code
javax.xml.transform.TransformerException
- 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.public void attribute(int nameCode, int typeCode, java.lang.CharSequence value, int properties) throws javax.xml.transform.TransformerException
nameCode
- The name of the attributevalue
- The value of the attributeproperties
- Bit fields containing properties of the attribute to be writtentypeCode
- The type of the attribute, as held in the name pool
javax.xml.transform.TransformerException
- 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.public void endElement() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public void comment(java.lang.CharSequence comment, int properties) throws javax.xml.transform.TransformerException
comment
- The content of the commentproperties
- Additional information about the comment. The following bits are
defined:
javax.xml.transform.TransformerException
public void processingInstruction(java.lang.String target, java.lang.CharSequence data, int properties) throws javax.xml.transform.TransformerException
target
- The PI name. This must be a legal name (it will not be checked).data
- The data portion of the processing instructionproperties
- Additional information about the PI. The following bits are
defined:
javax.xml.transform.TransformerException
public void append(Item item) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public void endDocument() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public void startContent() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |