| java.lang.Object net.sf.saxon.event.Emitter net.sf.saxon.event.XMLEmitter
All known Subclasses: net.sf.saxon.event.HTMLEmitter, net.sf.saxon.event.XHTMLEmitter, net.sf.saxon.event.MessageEmitter, net.sf.saxon.event.TEXTEmitter,
XMLEmitter | public class XMLEmitter extends Emitter (Code) | | XMLEmitter is an Emitter that generates XML output
to a specified destination.
|
Method Summary | |
public void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) | public void | characters(CharSequence chars, int locationId, int properties) Character data. | public void | close() End of the document. | public void | closeStartTag() | public void | comment(CharSequence chars, int locationId, int properties) Handle a comment. | protected String | emptyElementTagCloser(String displayName, int nameCode) Close an empty element tag. | public void | endDocument() | public void | endElement() End of an element. | public static void | main(String[] params) | public void | namespace(int namespaceCode, int properties) | public void | open() Start of the event stream. | protected void | openDocument() Do the real work of starting the document. | protected void | outputCharacterReference(int charval) | public void | processingInstruction(String target, CharSequence data, int locationId, int properties) Handle a processing instruction. | public void | startContent() | public void | startDocument(int properties) Start of a document node. | public 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. | public void | writeCharSequence(CharSequence s) | public void | writeDeclaration() | protected void | writeDocType(String type, String systemId, String publicId) | protected void | writeEscape(CharSequence chars, boolean inAttribute) Write contents of array to current writer, after escaping special characters. |
declarationIsWritten | protected boolean declarationIsWritten(Code) | | |
elementCode | protected int elementCode(Code) | | |
empty | protected boolean empty(Code) | | |
openStartTag | protected boolean openStartTag(Code) | | |
preferHex | protected boolean preferHex(Code) | | |
specialInAtt | static boolean[] specialInAtt(Code) | | |
specialInText | static boolean[] specialInText(Code) | | |
undeclareNamespaces | protected boolean undeclareNamespaces(Code) | | |
emptyElementTagCloser | protected String emptyElementTagCloser(String displayName, int nameCode)(Code) | | Close an empty element tag. (This is overridden in XHTMLEmitter).
|
open | public void open() throws XPathException(Code) | | Start of the event stream. Nothing is done at this stage: the opening of the output
file is deferred until some content is written to it.
|
openDocument | protected void openDocument() throws XPathException(Code) | | Do the real work of starting the document. This happens when the first
content is written.
throws: XPathException - |
startDocument | public void startDocument(int properties) throws XPathException(Code) | | Start of a document node. Nothing is done at this stage: the opening of the output
file is deferred until some content is written to it.
|
startElement | public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException(Code) | | Start of an element. Output the start tag, escaping special characters.
|
testCharacters | protected int testCharacters(CharSequence chars) throws XPathException(Code) | | Test that all characters in a name are supported in the target encoding.
zero if all the characters are available, or the value of thefirst offending character if not |
writeAttribute | protected void writeAttribute(int elCode, String attname, CharSequence value, int properties) throws XPathException(Code) | | Write attribute name=value pair.
Parameters: elCode - The element name is not used in this version of themethod, but is used in the HTML subclass. Parameters: attname - The attribute name, which has already been validated to ensureit can be written in this encoding Parameters: value - The value of the attribute Parameters: properties - Any special properties of the attribute |
writeDeclaration | public void writeDeclaration() throws XPathException(Code) | | Output the XML declaration
|
writeEscape | protected void writeEscape(CharSequence chars, boolean inAttribute) throws java.io.IOException, XPathException(Code) | | Write contents of array to current writer, after escaping special characters.
This method converts the XML special characters (such as < and &) into their
predefined entities.
Parameters: chars - The character sequence containing the string Parameters: inAttribute - Set to true if the text is in an attribute value |
|
|