net.sf.saxon.event
public class XMLEmitter extends Emitter
Field Summary | |
---|---|
protected boolean | declarationIsWritten |
protected int | elementCode |
protected Stack | elementStack |
protected boolean | empty |
protected boolean | openStartTag |
protected boolean | preferHex |
static boolean[] | specialInAtt |
static boolean[] | specialInText |
protected boolean | undeclareNamespaces |
Method Summary | |
---|---|
void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) |
void | characters(CharSequence chars, int locationId, int properties)
Character data. |
void | close()
End of the document. |
void | closeStartTag() |
void | comment(CharSequence chars, int locationId, int properties)
Handle a comment. |
protected String | emptyElementTagCloser(String displayName, int nameCode)
Close an empty element tag. |
void | endDocument()
Notify the end of a document node |
void | endElement()
End of an element. |
static void | main(String[] params) |
void | namespace(int namespaceCode, int properties) |
void | open()
Start of the event stream. |
protected void | openDocument()
Do the real work of starting the document. |
protected void | outputCharacterReference(int charval) |
void | processingInstruction(String target, CharSequence data, int locationId, int properties)
Handle a processing instruction. |
void | startContent() |
void | startDocument(int properties)
Start of a document node. |
void | startElement(int nameCode, int typeCode, int locationId, int properties)
Start of an element. |
protected int | testCharacters(CharSequence chars)
Test that all characters in a name are supported in the target encoding. |
protected void | writeAttribute(int elCode, String attname, CharSequence value, int properties)
Write attribute name=value pair. |
void | writeCharSequence(CharSequence s)
Write a CharSequence: various implementations |
void | writeDeclaration()
Output the XML declaration |
protected void | writeDocType(String type, String systemId, String publicId)
Output the document type declaration |
protected void | writeEscape(CharSequence chars, boolean inAttribute)
Write contents of array to current writer, after escaping special characters.
|
Throws: XPathException
Returns: zero if all the characters are available, or the value of the first offending character if not
Parameters: elCode The element name is not used in this version of the method, but is used in the HTML subclass. attname The attribute name, which has already been validated to ensure it can be written in this encoding value The value of the attribute properties Any special properties of the attribute
Parameters: chars The character sequence containing the string inAttribute Set to true if the text is in an attribute value