|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.icl.saxon.output.XMLEmitter
XMLEmitter is an Emitter that generates XML output to a specified destination.
| Field Summary | |
protected CharacterSet |
characterSet
|
protected boolean |
declarationIsWritten
|
protected boolean |
empty
|
protected boolean |
escaping
|
protected java.lang.String |
lastDisplayName
|
protected int |
lastNameCode
|
protected java.lang.String |
lastPrefix
|
protected java.lang.String |
lastURI
|
protected NamePool |
namePool
|
protected boolean |
openStartTag
|
protected OutputDetails |
outputDetails
|
protected boolean |
preferHex
|
protected java.io.Writer |
writer
|
| Constructor Summary | |
XMLEmitter()
|
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Character data. |
protected void |
closeStartTag(int nameCode,
boolean emptyTag)
|
void |
comment(char[] ch,
int start,
int length)
Handle a comment. |
protected java.lang.String |
emptyElementTagCloser(int nameCode)
Close an empty element tag. |
void |
endDocument()
End of the document. |
void |
endElement(int nameCode)
End of an element. |
protected void |
outputCharacterReference(int charval)
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Handle a processing instruction. |
void |
setCharacterSet(CharacterSet charSet)
Set the character set to use |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Set Document Locator. |
void |
setEscaping(boolean escaping)
Set escaping on or off |
void |
setNamePool(NamePool pool)
Set the name pool to be used for all name codes |
void |
setOutputDetails(OutputDetails details)
Set output details |
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri)
Set the URI for an unparsed entity in the document. |
void |
setWriter(java.io.Writer writer)
Set the Writer to use |
void |
startDocument()
Start of the document. |
void |
startElement(int nameCode,
org.xml.sax.Attributes attributes,
int[] namespaces,
int nscount)
Start of an element. |
protected void |
testCharacters(char[] array,
int start,
int len)
|
protected void |
testCharacters(java.lang.String name)
Test that all characters in a name are supported in the target encoding |
protected void |
writeAttribute(int elCode,
java.lang.String attname,
java.lang.String type,
java.lang.String value)
|
void |
writeDeclaration()
Output the XML declaration |
protected void |
writeDocType(java.lang.String type,
java.lang.String systemId,
java.lang.String publicId)
Output the document type declaration |
protected void |
writeEscape(char[] ch,
int start,
int length,
boolean inAttribute)
Write contents of array to current writer, after escaping special characters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.Writer writer
protected CharacterSet characterSet
protected OutputDetails outputDetails
protected NamePool namePool
protected boolean empty
protected boolean escaping
protected boolean openStartTag
protected boolean declarationIsWritten
protected boolean preferHex
protected int lastNameCode
protected java.lang.String lastDisplayName
protected java.lang.String lastPrefix
protected java.lang.String lastURI
| Constructor Detail |
public XMLEmitter()
| Method Detail |
public void setNamePool(NamePool pool)
setNamePool in interface Emitterpublic void setWriter(java.io.Writer writer)
setWriter in interface Emitterpublic void setCharacterSet(CharacterSet charSet)
setCharacterSet in interface Emitterpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface Emitter
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface Emitter
public void writeDeclaration()
throws org.xml.sax.SAXException
protected void writeDocType(java.lang.String type,
java.lang.String systemId,
java.lang.String publicId)
throws org.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface Emitter
public void startElement(int nameCode,
org.xml.sax.Attributes attributes,
int[] namespaces,
int nscount)
throws org.xml.sax.SAXException
startElement in interface Emittercom.icl.saxon.output.Emitternamespaces - Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount - Number of significant entries within namespaces array
protected void closeStartTag(int nameCode,
boolean emptyTag)
throws org.xml.sax.SAXException
protected java.lang.String emptyElementTagCloser(int nameCode)
protected void writeAttribute(int elCode,
java.lang.String attname,
java.lang.String type,
java.lang.String value)
throws org.xml.sax.SAXException
protected void testCharacters(java.lang.String name)
throws org.xml.sax.SAXException
protected void testCharacters(char[] array,
int start,
int len)
throws org.xml.sax.SAXException
public void endElement(int nameCode)
throws org.xml.sax.SAXException
endElement in interface Emitter
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface Emitter
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface Emitter
protected void writeEscape(char[] ch,
int start,
int length,
boolean inAttribute)
throws java.io.IOException
ch - The character array containing the stringstart - The start position of the input string within the character arraylength - The length of the input string within the character array
This method converts the XML special characters (such as < and &) into their
predefined entities.
protected void outputCharacterReference(int charval)
throws java.io.IOException
public void setEscaping(boolean escaping)
setEscaping in interface Emitter
public void comment(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
comment in interface Emitterpublic void setOutputDetails(OutputDetails details)
setOutputDetails in interface Emittercom.icl.saxon.output.Emitterdetails - The details of the required output
public void setUnparsedEntity(java.lang.String name,
java.lang.String uri)
throws org.xml.sax.SAXException
setUnparsedEntity in interface Emitter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||