org.exolab.adaptx.xslt.util

Class Configuration

public class Configuration extends Object

A simple configuration class for the XSLT processor

Version: $Revision: 4775 $ $Date: 2004-09-28 15:36:05 -0400 (Tue, 28 Sep 2004) $

Author: Keith Visco

Field Summary
static StringDEFAULT_PARSER
The default DOM parser
static StringDEFAULT_PARSER_NAME
static StringDOM_PARSER
The DOMParser property name
static StringJAXP_PARSER
The JAXP parser flag
static StringPROPERTIES_FILE
The Name of the properties file
static StringSAX_PARSER
The SAX parser property name
static booleanuseJAXP
A flag to indicate that JAXP should be used
Method Summary
static DOMParsergetDOMParser()
Returns the DOMParser specified in the properties file, or the one set via a call to #setDOMParser.
static StringgetProperty(String name)
Returns the property value associated with the given name
static ParsergetSAXParser()
Returns the SAX Parser specified in the properties file.
static XMLReadergetXMLReader()
Returns the configured XMLReader
static voidsetDOMParser(DOMParser domParser)
Sets the DOMParser to return when a call to getDOMParser is made.
static voidsetProperty(String property, String value)
Sets the property value associated with the given String.

Field Detail

DEFAULT_PARSER

public static final String DEFAULT_PARSER
The default DOM parser

DEFAULT_PARSER_NAME

public static final String DEFAULT_PARSER_NAME

DOM_PARSER

public static final String DOM_PARSER
The DOMParser property name

JAXP_PARSER

public static final String JAXP_PARSER
The JAXP parser flag

PROPERTIES_FILE

public static final String PROPERTIES_FILE
The Name of the properties file

SAX_PARSER

public static final String SAX_PARSER
The SAX parser property name

useJAXP

public static final boolean useJAXP
A flag to indicate that JAXP should be used

Method Detail

getDOMParser

public static DOMParser getDOMParser()
Returns the DOMParser specified in the properties file, or the one set via a call to #setDOMParser.

Returns: the DOMParser specified in the properties file

getProperty

public static String getProperty(String name)
Returns the property value associated with the given name

Returns: the property with the given name, or null if no property was found.

getSAXParser

public static Parser getSAXParser()
Returns the SAX Parser specified in the properties file. If no SAX parser was specified, the default one will be returned.

Returns: the SAX Parser specified in the properties file

getXMLReader

public static XMLReader getXMLReader()
Returns the configured XMLReader

Returns: an instance of the configured XMLReader

setDOMParser

public static void setDOMParser(DOMParser domParser)
Sets the DOMParser to return when a call to getDOMParser is made.
Note:This is static, so it will be shared with all instances of XSL:P within the same VM. A new instance of the parser will be created for thread safety, but only one type of DOMParser may be used.

Parameters: domParser the DOMParser to return when a call to #getDOMParser is made.

setProperty

public static void setProperty(String property, String value)
Sets the property value associated with the given String.

UNKNOWN: the property to set the value of the property
See xslp.properties for for a list of properties