|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.icl.saxon.output.Outputter
|
+--com.icl.saxon.output.GeneralOutputter
This class allows output to be generated. It channels output requests to an Emitter which does the actual writing.
| Fields inherited from class com.icl.saxon.output.Outputter |
emitter |
| Constructor Summary | |
GeneralOutputter(NamePool pool)
|
|
| Method Summary | |
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) |
protected void |
flushStartTag()
Flush out a pending start tag |
java.util.Properties |
getOutputProperties()
|
Emitter |
makeEmitter(java.util.Properties props,
javax.xml.transform.Result result)
Make an emitter appropriate for a given set of output properties and output destination. |
static java.io.FileOutputStream |
makeFileOutputStream(java.lang.String baseURI,
java.lang.String fileName,
boolean mkdirs)
Create a new FileOutputStream, given a filename and a baseURI |
void |
reset()
Synchronize the state of the Outputter with that of the underlying Emitter |
void |
setOutputDestination(java.util.Properties props,
javax.xml.transform.Result result)
Initialise the outputter for a new output destination, supplying the output format details. |
boolean |
thereIsAnOpenStartTag()
Test whether there is an open start tag. |
static java.lang.String |
urlToFileName(java.lang.String base)
The following atrocious code is borrowed from Xalan, where it is commented simply: // yuck. |
void |
write(java.lang.String s)
Produce literal output. |
void |
writeAttribute(int nameCode,
java.lang.String value)
Output an attribute value. |
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 |
writeContent(java.lang.StringBuffer chars,
int start,
int len)
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 |
void |
writeStartTag(int nameCode)
Output an element start tag. |
| Methods inherited from class com.icl.saxon.output.Outputter |
getEmitter, open, setEscaping |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GeneralOutputter(NamePool pool)
| Method Detail |
public void setOutputDestination(java.util.Properties props,
javax.xml.transform.Result result)
throws javax.xml.transform.TransformerException
outputProperties - Details of the new output formatresult - Details of the new output destinationpublic static java.lang.String urlToFileName(java.lang.String base)
public static java.io.FileOutputStream makeFileOutputStream(java.lang.String baseURI,
java.lang.String fileName,
boolean mkdirs)
throws javax.xml.transform.TransformerException
public Emitter makeEmitter(java.util.Properties props,
javax.xml.transform.Result result)
throws javax.xml.transform.TransformerException
public void reset()
throws javax.xml.transform.TransformerException
Outputterreset in class Outputterpublic java.util.Properties getOutputProperties()
getOutputProperties in class Outputter
public void write(java.lang.String s)
throws javax.xml.transform.TransformerException
Outputterwrite in class Outputter
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 failure
public 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 failure
public void writeContent(java.lang.StringBuffer chars,
int start,
int len)
throws javax.xml.transform.TransformerException
chars - StringBuffer containing to be outputstart - start position of characters to be outputlen - number of characters to be outputjavax.xml.transform.TransformerException - for any failure
public void writeStartTag(int nameCode)
throws javax.xml.transform.TransformerException
writeStartTag in class OutputternameCode - The element name code
public int checkAttributePrefix(int nameCode)
throws javax.xml.transform.TransformerException
checkAttributePrefix in class Outputter
public 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 Outputterpublic boolean thereIsAnOpenStartTag()
thereIsAnOpenStartTag in class Outputter
public void writeAttribute(int nameCode,
java.lang.String value)
throws javax.xml.transform.TransformerException
writeAttribute in class OutputternameCode - The name code of the attributevalue - The value of the attributejavax.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 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 code
public void writeComment(java.lang.String comment)
throws javax.xml.transform.TransformerException
writeComment in class Outputter
public void writePI(java.lang.String target,
java.lang.String data)
throws javax.xml.transform.TransformerException
writePI in class Outputter
public void close()
throws javax.xml.transform.TransformerException
close in class Outputter
protected void flushStartTag()
throws javax.xml.transform.TransformerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||