org.apache.xml.serializer

Interface XSLOutputAttributes

Known Subinterfaces:
SerializationHandler
Known Implementing Classes:
AdaptiveResultTreeImpl, EmptySerializer, SerializerBase, SimpleResultTreeImpl, StringValueHandler, ToHTMLSAXHandler, ToHTMLStream, ToSAXHandler, ToStream, ToTextSAXHandler, ToTextStream, ToUnknownStream, ToXMLSAXHandler, ToXMLStream

public interface XSLOutputAttributes

This interface has methods associated with the XSLT xsl:output attribues specified in the stylesheet that effect the format of the document output. In an XSLT stylesheet these attributes appear for example as:
  
 
The xsl:output attributes covered in this interface are:
 version
 encoding
 omit-xml-declarations
 standalone
 doctype-public
 doctype-system
 cdata-section-elements
 indent
 media-type
 
The one attribute not covered in this interface is method as this value is implicitly chosen by the serializer that is created, for example ToXMLStream vs. ToHTMLStream or another one.

Method Summary

String
getDoctypePublic()
Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD).
String
getDoctypeSystem()
Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD).
String
getEncoding()
boolean
getIndent()
int
getIndentAmount()
String
getMediaType()
boolean
getOmitXMLDeclaration()
String
getStandalone()
String
getVersion()
void
setCdataSectionElements(Vector URI_and_localNames)
Sets the value coming from the xsl:output cdata-section-elements stylesheet property.
void
setDoctype(String system, String pub)
Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
void
setDoctypePublic(String doctype)
Set the value coming from the xsl:output doctype-public stylesheet attribute.
void
setDoctypeSystem(String doctype)
Set the value coming from the xsl:output doctype-system stylesheet attribute.
void
setEncoding(String encoding)
Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
void
setIndent(boolean indent)
Sets the value coming from the xsl:output indent stylesheet attribute.
void
setMediaType(String mediatype)
Sets the value coming from the xsl:output media-type stylesheet attribute.
void
setOmitXMLDeclaration(boolean b)
Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
void
setStandalone(String standalone)
Sets the value coming from the xsl:output standalone stylesheet attribute.
void
setVersion(String version)
Sets the value coming from the xsl:output version attribute.

Method Details

getDoctypePublic

public String getDoctypePublic()
Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD).

Returns:
the public identifier to be used in the DOCTYPE declaration in the output document.


getDoctypeSystem

public String getDoctypeSystem()
Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD).

Returns:
the system identifier to be used in the DOCTYPE declaration in the output document.


getEncoding

public String getEncoding()

Returns:
the character encoding to be used in the output document.


getIndent

public boolean getIndent()

Returns:
true if the output document should be indented to visually indicate its structure.


getIndentAmount

public int getIndentAmount()

Returns:
the number of spaces to indent for each indentation level.


getMediaType

public String getMediaType()

Returns:
the mediatype the media-type or MIME type associated with the output document.


getOmitXMLDeclaration

public boolean getOmitXMLDeclaration()

Returns:
true if the XML declaration is to be omitted from the output document.


getStandalone

public String getStandalone()

Returns:
a value of "yes" if the standalone delaration is to be included in the output document.


getVersion

public String getVersion()

Returns:
the version of the output format.


setCdataSectionElements

public void setCdataSectionElements(Vector URI_and_localNames)
Sets the value coming from the xsl:output cdata-section-elements stylesheet property. This sets the elements whose text elements are to be output as CDATA sections.

Parameters:
URI_and_localNames - pairs of namespace URI and local names that identify elements whose text elements are to be output as CDATA sections. The namespace of the local element must be the given URI to match. The qName is not given because the prefix does not matter, only the namespace URI to which that prefix would map matters, so the prefix itself is not relevant in specifying which elements have their text to be output as CDATA sections.


setDoctype

public void setDoctype(String system,
                       String pub)
Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties

Parameters:
system - the system identifier to be used in the DOCTYPE declaration in the output document.
pub - the public identifier to be used in the DOCTYPE declaration in the output document.


setDoctypePublic

public void setDoctypePublic(String doctype)
Set the value coming from the xsl:output doctype-public stylesheet attribute.

Parameters:
doctype - the public identifier to be used in the DOCTYPE declaration in the output document.


setDoctypeSystem

public void setDoctypeSystem(String doctype)
Set the value coming from the xsl:output doctype-system stylesheet attribute.

Parameters:
doctype - the system identifier to be used in the DOCTYPE declaration in the output document.


setEncoding

public void setEncoding(String encoding)
Sets the character encoding coming from the xsl:output encoding stylesheet attribute.

Parameters:
encoding - the character encoding


setIndent

public void setIndent(boolean indent)
Sets the value coming from the xsl:output indent stylesheet attribute.

Parameters:
indent - true if the output document should be indented to visually indicate its structure.


setMediaType

public void setMediaType(String mediatype)
Sets the value coming from the xsl:output media-type stylesheet attribute.

Parameters:
mediatype - the media-type or MIME type associated with the output document.


setOmitXMLDeclaration

public void setOmitXMLDeclaration(boolean b)
Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute

Parameters:
b - true if the XML declaration is to be omitted from the output document.


setStandalone

public void setStandalone(String standalone)
Sets the value coming from the xsl:output standalone stylesheet attribute.

Parameters:
standalone - a value of "yes" indicates that the standalone delaration is to be included in the output document.


setVersion

public void setVersion(String version)
Sets the value coming from the xsl:output version attribute.

Parameters:
version - the version of the output format.


Copyright B) 2004 Apache XML Project. All Rights Reserved.