org.exolab.adaptx.xslt

Class XSLOutput

public class XSLOutput extends XSLObject implements OutputFormat

A class for maintaining state information for the output of the XSL result tree

Since: XSLT 19990813 (XSL:P version 19990928)

Version: $Revision: 4773 $ $Date: 2004-09-28 14:39:18 -0400 (Tue, 28 Sep 2004) $

Author: Keith Visco

Constructor Summary
XSLOutput()
Creates a new Output with the given parent Stylesheet
Method Summary
XSLOutputcopy()
Creates a new copy of this XSLOutput
StringgetDoctypePublicId()
Returns the Public Id that should be used for the Doctype
StringgetDoctypeSystemId()
Returns the System Id that should be used in the Doctype
StringgetEncoding()
booleangetIndent()
Returns whether or not indenting the result is allowed
StringgetMethod()
Returns the output method
Predefined output methods are: xml, html, and text
booleangetOmitXMLDeclaration()
Returns whether or not the XML declaration should be supressed when serializing the result
StringgetVersion()
Returns the XML version that should be output during serialization of the result tree
voidmerge(XSLOutput output)
Merges the given XSLOutput object into this one.
voidsetDoctypePublicId(String publicId)
Sets the Public Id that should be used for the Doctype
voidsetDoctypeSystemId(String systemId)
Sets the System ID that should be used in the Doctype
voidsetEncoding(String encoding)
voidsetIndent(boolean allowIndentation)
Returns whether or not indenting the result is allowed
voidsetMethod(String method)
Sets the output method
voidsetOmitXMLDeclaration(boolean omitDeclaration)
Sets whether or not the XML declaration should be supressed when serializing the result
voidsetVersion(String version)
Sets the version of the XML output (eg "1.0")

Constructor Detail

XSLOutput

public XSLOutput()
Creates a new Output with the given parent Stylesheet

Method Detail

copy

public XSLOutput copy()
Creates a new copy of this XSLOutput

Returns: the new XSLOutput

getDoctypePublicId

public String getDoctypePublicId()
Returns the Public Id that should be used for the Doctype

Returns: the Public Id that should be used for the Doctype, or null if none has been set

getDoctypeSystemId

public String getDoctypeSystemId()
Returns the System Id that should be used in the Doctype

Returns: the System Id that should be used for the Doctype, or null if none has been set

getEncoding

public String getEncoding()

getIndent

public boolean getIndent()
Returns whether or not indenting the result is allowed

Returns: true if whitespace may be added to the output result for indentation and readability, otherwise returns false

getMethod

public String getMethod()
Returns the output method
Predefined output methods are: xml, html, and text

Returns: the output method

getOmitXMLDeclaration

public boolean getOmitXMLDeclaration()
Returns whether or not the XML declaration should be supressed when serializing the result

Returns: true if the XML declaration should be supressed when serializing the result

getVersion

public String getVersion()
Returns the XML version that should be output during serialization of the result tree

Returns: the XML version that should be used during serialization of of the result tree

merge

public void merge(XSLOutput output)
Merges the given XSLOutput object into this one. Any attributes already existing in this XSLOutput will be over-written with the ones from the given XSLOutput.

Parameters: output the XSLOutput to merge with this one.

setDoctypePublicId

public void setDoctypePublicId(String publicId)
Sets the Public Id that should be used for the Doctype

Parameters: publicId the Public Id that should be used for the Doctype

setDoctypeSystemId

public void setDoctypeSystemId(String systemId)
Sets the System ID that should be used in the Doctype

Parameters: systemId the System ID for the Doctype

setEncoding

public void setEncoding(String encoding)

setIndent

public void setIndent(boolean allowIndentation)
Returns whether or not indenting the result is allowed

Returns: true if whitespace may be added to the output result for indentation and readability, otherwise returns false

setMethod

public void setMethod(String method)
Sets the output method

Parameters: method, the output method of this xsl:output object
Predefined output methods are: xml, html, and text

setOmitXMLDeclaration

public void setOmitXMLDeclaration(boolean omitDeclaration)
Sets whether or not the XML declaration should be supressed when serializing the result

Parameters: omitDeclaration, the flag indicating whether or not the XML declaration should be supressed when serializing the result. Use true if you do NOT want the XML Declaration to appear in the output. The default value depends on the Method. If the method is "xml", this value will be false by default. If the method is "html", this value will be true by default.

setVersion

public void setVersion(String version)
Sets the version of the XML output (eg "1.0")

Parameters: version, the xml version to output
Predefined output methods are: xml, html, and text