public final class StringOutputter extends Outputter
| Constructor and Description |
|---|
StringOutputter(java.lang.StringBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
int |
checkAttributePrefix(int nameCode)
Check that the prefix for an attribute is acceptable, returning a substitute
prefix if not.
|
void |
close()
Close the output
|
void |
copyNamespaceNode(int nscode)
Copy a namespace node to the current element node
(Rules defined in XSLT 1.0 errata)
|
java.util.Properties |
getOutputProperties() |
void |
reset()
Synchronize the state of the Outputter with that of the underlying Emitter
|
void |
setErrorListener(javax.xml.transform.ErrorListener listener) |
boolean |
thereIsAnOpenStartTag()
Test whether there is an open start tag.
|
void |
write(java.lang.String s)
Produce literal output.
|
void |
writeAttribute(int nameCode,
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 |
writeEndTag(int nameCode)
Output an element end tag.
|
void |
writeNamespaceDeclaration(int nscode)
Output a namespace declaration.
|
void |
writePI(java.lang.String target,
java.lang.String data)
Write a processing instruction
No-op in this implementation
|
void |
writeStartTag(int nameCode)
Output an element start tag.
|
getEmitter, open, setEscaping, writeAttributepublic void setErrorListener(javax.xml.transform.ErrorListener listener)
public void reset()
throws javax.xml.transform.TransformerException
Outputterpublic java.util.Properties getOutputProperties()
getOutputProperties in class Outputterpublic void write(java.lang.String s)
throws javax.xml.transform.TransformerException
public void writeContent(java.lang.String s)
throws javax.xml.transform.TransformerException
writeContent in class Outputters - The String to be outputjavax.xml.transform.TransformerException - for any failurepublic void writeContent(char[] chars,
int start,
int length)
throws javax.xml.transform.TransformerException
writeContent in class Outputterchars - Character array to be outputstart - start position of characters to be outputlength - number of characters to be outputjavax.xml.transform.TransformerException - for any failurepublic void writeStartTag(int nameCode)
throws javax.xml.transform.TransformerException
writeStartTag in class OutputternameCode - The element name codejavax.xml.transform.TransformerExceptionpublic int checkAttributePrefix(int nameCode)
throws javax.xml.transform.TransformerException
checkAttributePrefix in class Outputterjavax.xml.transform.TransformerExceptionpublic void writeNamespaceDeclaration(int nscode)
throws javax.xml.transform.TransformerException
writeNamespaceDeclaration in class Outputternscode - The namespace codejavax.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 copyNamespaceNode(int nscode)
throws javax.xml.transform.TransformerException
copyNamespaceNode in class Outputterjavax.xml.transform.TransformerExceptionpublic boolean thereIsAnOpenStartTag()
thereIsAnOpenStartTag in class Outputterpublic void writeAttribute(int nameCode,
java.lang.String value,
boolean noEscape)
throws javax.xml.transform.TransformerException
writeAttribute in class Outputtername - 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.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 writeEndTag(int nameCode)
throws javax.xml.transform.TransformerException
writeEndTag in class OutputternameCode - The element name codejavax.xml.transform.TransformerExceptionpublic void writeComment(java.lang.String comment)
throws javax.xml.transform.TransformerException
writeComment in class Outputterjavax.xml.transform.TransformerExceptionpublic void writePI(java.lang.String target,
java.lang.String data)
throws javax.xml.transform.TransformerException