org.apache.xml.serializer
Interface XSLOutputAttributes

All Known Subinterfaces:
SerializationHandler

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
 java.lang.String getDoctypePublic()
          Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD).
 java.lang.String getDoctypeSystem()
          Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD).
 java.lang.String getEncoding()
           
 boolean getIndent()
           
 int getIndentAmount()
           
 java.lang.String getMediaType()
           
 boolean getOmitXMLDeclaration()
           
 java.lang.String getStandalone()
           
 java.lang.String getVersion()
           
 void setCdataSectionElements(java.util.Vector URI_and_localNames)
          Sets the value coming from the xsl:output cdata-section-elements stylesheet property.
 void setDoctype(java.lang.String system, java.lang.String pub)
          Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
 void setDoctypePublic(java.lang.String doctype)
          Set the value coming from the xsl:output doctype-public stylesheet attribute.
 void setDoctypeSystem(java.lang.String doctype)
          Set the value coming from the xsl:output doctype-system stylesheet attribute.
 void setEncoding(java.lang.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(java.lang.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(java.lang.String standalone)
          Sets the value coming from the xsl:output standalone stylesheet attribute.
 void setVersion(java.lang.String version)
          Sets the value coming from the xsl:output version attribute.
 

Method Detail

getDoctypePublic

public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String getStandalone()
Returns:
a value of "yes" if the standalone delaration is to be included in the output document.

getVersion

public java.lang.String getVersion()
Returns:
the version of the output format.

setCdataSectionElements

public void setCdataSectionElements(java.util.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(java.lang.String system,
                       java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String version)
Sets the value coming from the xsl:output version attribute.
Parameters:
version - the version of the output format.


Copyright © 2004 Apache XML Project. All Rights Reserved.