|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.output.Outputter
This class allows output to be generated. It channels output requests to an Emitter which does the actual writing.
Constructor Summary | |
Outputter()
|
Method Summary | |
void |
close()
Close the output |
protected void |
flushStartTag()
Flush out a pending start tag |
Emitter |
getEmitter()
Get emitter. |
OutputDetails |
getOutputDetails()
|
void |
open()
Start the output process |
void |
setEmitter(Emitter handler)
Set the emitter that will deal with this output |
void |
setEscaping(boolean escaping)
Switch escaping (of special characters) on or off. |
void |
setOutputDetails(OutputDetails details)
|
void |
write(java.lang.String s)
|
void |
writeAttribute(Name name,
java.lang.String value)
Output an attribute value. |
void |
writeAttribute(Name name,
java.lang.String value,
boolean noEscape)
Output an attribute value. |
void |
writeComment(java.lang.String comment)
Write a comment |
void |
writeContent(char[] chars,
int start,
int length)
Produce text content output. |
void |
writeContent(java.lang.String s)
Produce text content output. |
void |
writeContent(java.lang.StringBuffer chars,
int start,
int length)
Produce text content output. |
void |
writeEndTag(Name name)
Output an element end tag. |
void |
writeNamespaceDeclaration(java.lang.String prefix,
java.lang.String uri,
boolean substitute)
Output a namespace declaration. |
void |
writePI(java.lang.String target,
java.lang.String data)
Write a processing instruction |
void |
writeStartTag(Name name)
Output an element start tag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Outputter()
Method Detail |
public void setEmitter(Emitter handler)
public Emitter getEmitter() throws org.xml.sax.SAXException
public void setOutputDetails(OutputDetails details) throws org.xml.sax.SAXException
public OutputDetails getOutputDetails()
public void setEscaping(boolean escaping) throws org.xml.sax.SAXException
escaping:
- true if special characters are to be escaped, false if not.public void open() throws org.xml.sax.SAXException
public void write(java.lang.String s) throws org.xml.sax.SAXException
public void writeContent(java.lang.String s) throws org.xml.sax.SAXException
s
- The String to be outputorg.xml.sax.SAXException
- for any failurepublic void writeContent(char[] chars, int start, int length) throws org.xml.sax.SAXException
chars
- Character array to be outputstart
- start position of characters to be outputlength
- number of characters to be outputorg.xml.sax.SAXException
- for any failurepublic void writeContent(java.lang.StringBuffer chars, int start, int length) throws org.xml.sax.SAXException
chars
- StringBuffer containing to be outputstart
- start position of characters to be outputlength
- number of characters to be outputorg.xml.sax.SAXException
- for any failurepublic void writeStartTag(Name name) throws org.xml.sax.SAXException
name
- The element namepublic void writeNamespaceDeclaration(java.lang.String prefix, java.lang.String uri, boolean substitute) throws org.xml.sax.SAXException
prefix
- The namespace prefix ("" for the default namespace)uri
- The namespace URIsubstitute
- If true, when a duplicate prefix is issued for a different URI,
the prefix is replaced with a substitute prefix. If false, under these circumstances
the declaration is ignored as a duplicate.org.xml.sax.SAXException
- 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 writeAttribute(Name name, java.lang.String value) throws org.xml.sax.SAXException
name
- The name of the attributevalue
- The value of the attributeorg.xml.sax.SAXException
- 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 writeAttribute(Name name, java.lang.String value, boolean noEscape) throws org.xml.sax.SAXException
name
- The name of the attributevalue
- The value of the attributenoEscape
- True if it's known there are no special characters in the value. If
unsure, set this to false.org.xml.sax.SAXException
- 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 writeEndTag(Name name) throws org.xml.sax.SAXException
name
- The element name (tag)public void writeComment(java.lang.String comment) throws org.xml.sax.SAXException
public void writePI(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
public void close() throws org.xml.sax.SAXException
protected void flushStartTag() throws org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |