jd.xml.xslt.format
Class OutputFormat

java.lang.Object
  extended byjd.xml.xslt.format.OutputFormat

public class OutputFormat
extends Object

The output format of a transformed document.


Field Summary
static String METHOD_CANONICAL_XML
           
static String METHOD_DEFAULT
           
static String METHOD_EMPTY
           
static String METHOD_HTML
           
static String METHOD_TEXT
           
static String METHOD_XML
           
static int OPTION_DOCTYPE_PUBLIC
           
static int OPTION_DOCTYPE_SYSTEM
           
static int OPTION_ENCODING
           
static int OPTION_INDENT
           
static int OPTION_MEDIA_TYPE
           
static int OPTION_METHOD
           
static int OPTION_OMIT_XML_DECL
           
static int OPTION_STANDALONE
           
static int OPTION_VERSION
           
static int OPTIONS
           
 
Constructor Summary
OutputFormat()
           
 
Method Summary
 void copyFrom(OutputFormat format)
          Copy the specified values from another OutputFormat.
 String getDocTypePublic()
          Return the doc type public specifier.
 String getDocTypeSystem()
          Return the doc type system specifier.
 Encoding getEncoding(Encoding defaultEncoding)
          Return the encoding attribute.
 boolean getIndent(boolean defaultIndent)
          Return the indent attribute.
 String getMediaType(String defaultMediaType)
          Return the media type attribute.
 String getMethod()
          Return the output method.
 boolean getOmitXmlDeclaration(boolean defaultOmit)
          Return whether to omit the xml declaration.
 String getOption(int option)
          Return the string value of an option.
static int getOptionIndex(String name)
          Return the option index for its name.
static String getOptionName(int index)
          Return the option name for its index.
 Boolean getStandalone()
          Return the standalone attribute.
 String getVersion(String defaultVersion)
          Return the version attribute.
 boolean isCDataSectionElement(String namespaceUri, String localName)
          Test if a element is a CDATASection element.
static boolean isStandardMethod(String method)
          Test if a method is a standard method (xml, html or text).
 void setCDataSectionElements(Hashtable cdataSectionElements)
           
 void setOption(int option, String s)
          Set the value of an option.
 void setOption(String name, String value)
          Set the value of an option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_METHOD

public static final int OPTION_METHOD
See Also:
Constant Field Values

OPTION_INDENT

public static final int OPTION_INDENT
See Also:
Constant Field Values

OPTION_ENCODING

public static final int OPTION_ENCODING
See Also:
Constant Field Values

OPTION_OMIT_XML_DECL

public static final int OPTION_OMIT_XML_DECL
See Also:
Constant Field Values

OPTION_STANDALONE

public static final int OPTION_STANDALONE
See Also:
Constant Field Values

OPTION_DOCTYPE_PUBLIC

public static final int OPTION_DOCTYPE_PUBLIC
See Also:
Constant Field Values

OPTION_DOCTYPE_SYSTEM

public static final int OPTION_DOCTYPE_SYSTEM
See Also:
Constant Field Values

OPTION_MEDIA_TYPE

public static final int OPTION_MEDIA_TYPE
See Also:
Constant Field Values

OPTION_VERSION

public static final int OPTION_VERSION
See Also:
Constant Field Values

OPTIONS

public static final int OPTIONS
See Also:
Constant Field Values

METHOD_XML

public static final String METHOD_XML
See Also:
Constant Field Values

METHOD_HTML

public static final String METHOD_HTML
See Also:
Constant Field Values

METHOD_TEXT

public static final String METHOD_TEXT
See Also:
Constant Field Values

METHOD_CANONICAL_XML

public static final String METHOD_CANONICAL_XML
See Also:
Constant Field Values

METHOD_EMPTY

public static final String METHOD_EMPTY
See Also:
Constant Field Values

METHOD_DEFAULT

public static final String METHOD_DEFAULT
Constructor Detail

OutputFormat

public OutputFormat()
Method Detail

getOptionName

public static String getOptionName(int index)
Return the option name for its index.


getOptionIndex

public static int getOptionIndex(String name)
Return the option index for its name.

Returns:
the index or -1 if the name is not valid.

setOption

public void setOption(int option,
                      String s)
Set the value of an option.


setOption

public void setOption(String name,
                      String value)
Set the value of an option.


getOption

public String getOption(int option)
Return the string value of an option.


isStandardMethod

public static boolean isStandardMethod(String method)
Test if a method is a standard method (xml, html or text).


getMethod

public String getMethod()
Return the output method.

Returns:
the returned string is one of the method constants defined in this class.

getVersion

public String getVersion(String defaultVersion)
Return the version attribute. If not specified return the default value.


getIndent

public boolean getIndent(boolean defaultIndent)
Return the indent attribute. If not specified return the default value.


getEncoding

public Encoding getEncoding(Encoding defaultEncoding)
Return the encoding attribute. If not specified return the default value.


getMediaType

public String getMediaType(String defaultMediaType)
Return the media type attribute. If not specified return the default value.


getDocTypeSystem

public String getDocTypeSystem()
Return the doc type system specifier.


getDocTypePublic

public String getDocTypePublic()
Return the doc type public specifier.


getOmitXmlDeclaration

public boolean getOmitXmlDeclaration(boolean defaultOmit)
Return whether to omit the xml declaration.


getStandalone

public Boolean getStandalone()
Return the standalone attribute.


setCDataSectionElements

public void setCDataSectionElements(Hashtable cdataSectionElements)

isCDataSectionElement

public boolean isCDataSectionElement(String namespaceUri,
                                     String localName)
Test if a element is a CDATASection element.

Parameters:
namespaceUri - its namespace
localName - its local name

copyFrom

public void copyFrom(OutputFormat format)
Copy the specified values from another OutputFormat.