com.icl.saxon.output
Class OutputDetails

java.lang.Object
  |
  +--com.icl.saxon.output.OutputDetails
Direct Known Subclasses:
TextFragment

public class OutputDetails
extends java.lang.Object

An OutputDetails object holds parameters controlling the generation of output files


Constructor Summary
OutputDetails()
          Construct a default OutputDetails object
OutputDetails(OutputDetails base)
          Construct an OutputDetails object as a copy of an existing OutputDetails object
 
Method Summary
 void addCdataElement(int nameCode)
          Supply a single output element name that is to be treated as CDATA elements
 void addCdataElements(java.util.Vector v)
          Supply a list of output element names that are to be treated as CDATA elements
 java.util.Vector getCdataElements()
          Get the list of elements to be treated as CDATA
 java.lang.String getCharacterRepresentation()
          Determine the preferred character representation in HTML output
 boolean getCloseAfterUse()
          Determine whether the Writer should be closed after use
 java.lang.String getDoctypePublic()
          Get the Public ID of the DOCTYPE declaration
 java.lang.String getDoctypeSystem()
          Get the System ID of the DOCTYPE declaration
 org.w3c.dom.Node getDOMNode()
          Get the DOM node to which output should be attached
 Emitter getEmitter()
          Get the current Emitter
 java.lang.String getEncoding()
          Get the character encoding
 boolean getIncludeHtmlMetaTag()
          Determine whether a META tag should be included after the HEAD tag in HTML output
 java.lang.String getIndent()
          Determine whether indenting is on or off
 int getIndentSpaces()
          Get number of spaces to indent by
 java.lang.String getMediaType()
          Get the MIME media type.
 java.lang.String getMethod()
          Get the output method (html, xml, text etc)
 PreparedStyleSheet getNextInChain()
          Get the StyleSheet to be used to handle the output of this one
 java.lang.String getOmitDeclaration()
          Is XML Declaration to be omitted?
 java.io.OutputStream getOutputStream()
          Get the output stream being used for output
 java.lang.String getStandalone()
          Is the output "standalone"?
 java.lang.String getUserData()
          Get the user data (from the saxon:output user-data attribute)
 java.lang.String getVersion()
          Get the version of the output format, e.g.
 java.io.Writer getWriter()
          Get the Writer being used for output
 boolean isEscaping()
          Should special characters be escaped?
 boolean isIndenting()
          Decide whether indenting is on or off
 void setCharacterRepresentation(java.lang.String rep)
          Set preferred character representation in HTML output.
 void setCloseAfterUse(boolean close)
          Indicate whether the Writer should be closed after use
 void setDoctypePublic(java.lang.String s)
          Set the Public ID to be used in the DOCTYPE declaration
 void setDoctypeSystem(java.lang.String s)
          Set the System ID to be used in the DOCTYPE declaration
 void setDOMNode(org.w3c.dom.Node node)
          Set the DOM node to which output should be appended
 void setEmitter(Emitter h)
          Set the Emitter to be used for output
 void setEncoding(java.lang.String s)
          Set the encoding.
 void setEscaping(boolean b)
          Switch on or off escaping of special characters
 void setIncludeHtmlMetaTag(boolean yes)
          Set whether a META tag should be included after the HEAD tag in HTML output
 void setIndent(java.lang.String s)
          Set indenting on or off
 void setIndentSpaces(int spaces)
          Set number of spaces to indent by
 void setMediaType(java.lang.String s)
          Set the MIME media type, e.g.
 void setMethod(java.lang.String s)
          Set the method to be used
 void setNextInChain(PreparedStyleSheet next)
          Set the StyleSheet to be used to handle the output of this one
 void setOmitDeclaration(java.lang.String s)
          Indicate whether the XML Declaration should be omitted
 void setOutputStream(java.io.OutputStream out)
          Set the output stream to be used for producing output
 void setStandalone(java.lang.String s)
          Indicate whether the output document is "standalone"
 void setUserData(java.lang.String s)
          Set user data (from the saxon:output user-data attribute).
 void setVersion(java.lang.String s)
          Set the version of the output format, e.g.
 void setWriter(java.io.Writer w)
          Set the writer to be used for producing output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputDetails

public OutputDetails()
Construct a default OutputDetails object

OutputDetails

public OutputDetails(OutputDetails base)
Construct an OutputDetails object as a copy of an existing OutputDetails object
Method Detail

setWriter

public final void setWriter(java.io.Writer w)
Set the writer to be used for producing output. If set, this overrides the supplied output stream and encoding.

setOutputStream

public final void setOutputStream(java.io.OutputStream out)
Set the output stream to be used for producing output

setMethod

public final void setMethod(java.lang.String s)
Set the method to be used
Parameters:
s - the output method: "html", "xml", "text", "fop", or a user-supplied DocumentHandler or Emitter class name

setVersion

public final void setVersion(java.lang.String s)
Set the version of the output format, e.g. "1.0" for xml or "4.0" for html

setIndent

public final void setIndent(java.lang.String s)
Set indenting on or off
Parameters:
s - "yes" (indent) or "no" (don't indent)

setIndentSpaces

public void setIndentSpaces(int spaces)
Set number of spaces to indent by

setEncoding

public final void setEncoding(java.lang.String s)
Set the encoding. This must be an encoding name recognised by the Java VM

setMediaType

public final void setMediaType(java.lang.String s)
Set the MIME media type, e.g. "text/xml"

setDoctypeSystem

public final void setDoctypeSystem(java.lang.String s)
Set the System ID to be used in the DOCTYPE declaration

setDoctypePublic

public final void setDoctypePublic(java.lang.String s)
Set the Public ID to be used in the DOCTYPE declaration

setOmitDeclaration

public final void setOmitDeclaration(java.lang.String s)
Indicate whether the XML Declaration should be omitted
Parameters:
s - "yes": omit the declaration; "no": include the declaration

setStandalone

public final void setStandalone(java.lang.String s)
Indicate whether the output document is "standalone"
Parameters:
s - "yes" or "no"

setUserData

public final void setUserData(java.lang.String s)
Set user data (from the saxon:output user-data attribute). This is only useful with a user-defined Emitter.
Parameters:
s - the user data

addCdataElements

public final void addCdataElements(java.util.Vector v)
Supply a list of output element names that are to be treated as CDATA elements
Parameters:
s - A white-space separated list of element names

addCdataElement

public final void addCdataElement(int nameCode)
Supply a single output element name that is to be treated as CDATA elements
Parameters:
namecode - Integer name code of the relevant element

setEscaping

public final void setEscaping(boolean b)
Switch on or off escaping of special characters
Parameters:
b - true: special characters are escaped; false: special characters are not escaped

setEmitter

public final void setEmitter(Emitter h)
Set the Emitter to be used for output

setNextInChain

public final void setNextInChain(PreparedStyleSheet next)
Set the StyleSheet to be used to handle the output of this one

setCloseAfterUse

public final void setCloseAfterUse(boolean close)
Indicate whether the Writer should be closed after use

setDOMNode

public final void setDOMNode(org.w3c.dom.Node node)
Set the DOM node to which output should be appended

setIncludeHtmlMetaTag

public void setIncludeHtmlMetaTag(boolean yes)
Set whether a META tag should be included after the HEAD tag in HTML output

setCharacterRepresentation

public void setCharacterRepresentation(java.lang.String rep)
Set preferred character representation in HTML output. Value is "rep1[;rep2]", rep1 is the representation for non-ASCII characters available in the encoding, rep2 the representation for characters not present in the encoding. Values are native, entity, decimal, or hex.

getWriter

public final java.io.Writer getWriter()
Get the Writer being used for output

getOutputStream

public final java.io.OutputStream getOutputStream()
Get the output stream being used for output

getMethod

public final java.lang.String getMethod()
Get the output method (html, xml, text etc)

getVersion

public final java.lang.String getVersion()
Get the version of the output format, e.g. "1.0"

getIndent

public final java.lang.String getIndent()
Determine whether indenting is on or off
Returns:
"yes" or "no" as a string.

isIndenting

public final boolean isIndenting()
Decide whether indenting is on or off
Returns:
true or false

getIndentSpaces

public int getIndentSpaces()
Get number of spaces to indent by

getEncoding

public final java.lang.String getEncoding()
Get the character encoding

getMediaType

public final java.lang.String getMediaType()
Get the MIME media type. This will either be the media type specified, or if none was specified, the media type associated with the output method; if that is unknown, assume application/xml

getDoctypeSystem

public final java.lang.String getDoctypeSystem()
Get the System ID of the DOCTYPE declaration

getDoctypePublic

public final java.lang.String getDoctypePublic()
Get the Public ID of the DOCTYPE declaration

getOmitDeclaration

public final java.lang.String getOmitDeclaration()
Is XML Declaration to be omitted?
Returns:
"yes" or "no"

getStandalone

public final java.lang.String getStandalone()
Is the output "standalone"?
Returns:
"yes" or "no"

getUserData

public final java.lang.String getUserData()
Get the user data (from the saxon:output user-data attribute)

getCdataElements

public final java.util.Vector getCdataElements()
Get the list of elements to be treated as CDATA
Returns:
a Vector of Name objects

isEscaping

public final boolean isEscaping()
Should special characters be escaped?

getEmitter

public final Emitter getEmitter()
Get the current Emitter

getNextInChain

public final PreparedStyleSheet getNextInChain()
Get the StyleSheet to be used to handle the output of this one

getCloseAfterUse

public final boolean getCloseAfterUse()
Determine whether the Writer should be closed after use

getDOMNode

public final org.w3c.dom.Node getDOMNode()
Get the DOM node to which output should be attached

getIncludeHtmlMetaTag

public boolean getIncludeHtmlMetaTag()
Determine whether a META tag should be included after the HEAD tag in HTML output

getCharacterRepresentation

public java.lang.String getCharacterRepresentation()
Determine the preferred character representation in HTML output