org.apache.xalan.processor
Class XSLTAttributeDef

java.lang.Object
  extended by org.apache.xalan.processor.XSLTAttributeDef

public class XSLTAttributeDef
extends java.lang.Object

This class defines an attribute for an element in a XSLT stylesheet, is meant to reflect the structure defined in http://www.w3.org/TR/xslt#dtd, and the mapping between Xalan classes and the markup attributes in the element.


Field Summary
(package private) static int ERROR
           
(package private) static int FATAL
           
private  java.lang.String m_default
          The default value for this attribute.
private  StringToIntTable m_enums
          If this element is of type T_ENUM, this will contain a map from the attribute string to the Xalan integer value.
(package private)  int m_errorType
           
(package private) static XSLTAttributeDef m_foreignAttr
          Representation for an attribute in a foreign namespace.
private  java.lang.String m_name
          The name of this element.
private  java.lang.String m_namespace
          The allowed namespace for this element.
private  boolean m_required
          If true, this is a required attribute.
(package private)  java.lang.String m_setterString
          String that should represent the setter method which which may be used on objects to set a value that represents this attribute
private  boolean m_supportsAVT
          If true, this is attribute supports AVT's.
private  int m_type
          The type of this attribute value.
(package private) static java.lang.String S_FOREIGNATTR_SETTER
          Method name that objects may implement if they wish to have forein attributes set.
(package private) static int T_AVT
          Type values that represent XSLT attribute types.
(package private) static int T_AVT_QNAME
          Type values that represent XSLT attribute types.
(package private) static int T_CDATA
          Type values that represent XSLT attribute types.
(package private) static int T_CHAR
          Type values that represent XSLT attribute types.
(package private) static int T_ENUM
          Type values that represent XSLT attribute types.
(package private) static int T_ENUM_OR_PQNAME
          Type values that represent XSLT attribute types.
(package private) static int T_EXPR
          Type values that represent XSLT attribute types.
(package private) static int T_NCNAME
          Type values that represent XSLT attribute types.
(package private) static int T_NMTOKEN
          Type values that represent XSLT attribute types.
(package private) static int T_NUMBER
          Type values that represent XSLT attribute types.
(package private) static int T_PATTERN
          Type values that represent XSLT attribute types.
(package private) static int T_PREFIX_URLLIST
          Type values that represent XSLT attribute types.
(package private) static int T_PREFIXLIST
          Type values that represent XSLT attribute types.
(package private) static int T_QNAME
          Type values that represent XSLT attribute types.
(package private) static int T_QNAMES
          Type values that represent XSLT attribute types.
(package private) static int T_QNAMES_RESOLVE_NULL
          Type values that represent XSLT attribute types.
(package private) static int T_SIMPLEPATTERNLIST
          Type values that represent XSLT attribute types.
(package private) static int T_STRINGLIST
          Type values that represent XSLT attribute types.
(package private) static int T_URL
          Type values that represent XSLT attribute types.
(package private) static int T_YESNO
          Type values that represent XSLT attribute types.
(package private) static int WARNING
           
 
Constructor Summary
XSLTAttributeDef(java.lang.String namespace, java.lang.String name, boolean required, boolean supportsAVT, boolean prefixedQNameValAllowed, int errorType, java.lang.String k1, int v1, java.lang.String k2, int v2)
          Construct an instance of XSLTAttributeDef that uses two enumerated values.
XSLTAttributeDef(java.lang.String namespace, java.lang.String name, boolean required, boolean supportsAVT, boolean prefixedQNameValAllowed, int errorType, java.lang.String k1, int v1, java.lang.String k2, int v2, java.lang.String k3, int v3)
          Construct an instance of XSLTAttributeDef that uses three enumerated values.
XSLTAttributeDef(java.lang.String namespace, java.lang.String name, boolean required, boolean supportsAVT, boolean prefixedQNameValAllowed, int errorType, java.lang.String k1, int v1, java.lang.String k2, int v2, java.lang.String k3, int v3, java.lang.String k4, int v4)
          Construct an instance of XSLTAttributeDef that uses three enumerated values.
XSLTAttributeDef(java.lang.String namespace, java.lang.String name, int type, boolean required, boolean supportsAVT, int errorType)
          Construct an instance of XSLTAttributeDef.
XSLTAttributeDef(java.lang.String namespace, java.lang.String name, int type, boolean supportsAVT, int errorType, java.lang.String defaultVal)
          Construct an instance of XSLTAttributeDef.
 
Method Summary
(package private)  java.lang.String getDefault()
          Get the default value for this attribute.
private  int getEnum(java.lang.String key)
          If this element is of type T_ENUM, this will return a map from the attribute string to the Xalan integer value.
private  java.lang.String[] getEnumNames()
          If this element is of type T_ENUM, this will return an array of strings - the values in the enumeration
(package private)  int getErrorType()
          Get the type of error message to use if the attribute value is invalid.
private  java.lang.StringBuffer getListOfEnums()
          StringBuffer containing comma delimited list of valid values for ENUM type.
(package private)  java.lang.String getName()
          Get the name of this attribute.
(package private)  java.lang.String getNamespace()
          Get the allowed namespace for this attribute.
private  java.lang.Class getPrimativeClass(java.lang.Object obj)
          Get the primative type for the class, if there is one.
(package private)  boolean getRequired()
          Get whether or not this is a required attribute.
 java.lang.String getSetterMethodName()
          Return a string that should represent the setter method.
(package private)  boolean getSupportsAVT()
          Get whether or not this attribute supports AVT's.
(package private)  int getType()
          Get the type of this attribute value.
private  void handleError(StylesheetHandler handler, java.lang.String msg, java.lang.Object[] args, java.lang.Exception exc)
           
(package private)  java.lang.Object processAVT_QNAME(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_QNAME into a QName value.
(package private)  AVT processAVT(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_AVT into a AVT value.
(package private)  java.lang.Object processCDATA(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_CDATA into a String value.
(package private)  java.lang.Object processCHAR(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_CHAR into a Character value.
(package private)  java.lang.Object processENUM_OR_PQNAME(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of that is either an enumerated value or a qname-but-not-ncname.
(package private)  java.lang.Object processENUM(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_ENUM into a int value.
(package private)  java.lang.Object processEXPR(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_EXPR into an XPath value.
(package private)  java.lang.Object processNCNAME(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type NCName into a String
(package private)  java.lang.Object processNMTOKEN(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_NMTOKEN into a String value.
(package private)  java.lang.Object processNUMBER(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_NUMBER into a double value.
(package private)  java.lang.Object processPATTERN(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_PATTERN into an XPath match pattern value.
(package private)  StringVector processPREFIX_LIST(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value)
          Process an attribute string of type T_PREFIXLIST into a vector of prefixes that may be resolved to URLs.
(package private)  StringVector processPREFIX_URLLIST(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value)
          Process an attribute string of type T_URLLIST into a vector of prefixes that may be resolved to URLs.
(package private)  java.lang.Object processQNAME(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_QNAME into a QName value.
(package private)  java.util.Vector processQNAMES(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value)
          Process an attribute string of type T_QNAMES into a vector of QNames where the specification requires that non-prefixed elements not be placed in a namespace.
(package private)  java.util.Vector processQNAMESRNU(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value)
          Process an attribute string of type T_QNAMES_RESOLVE_NULL into a vector of QNames where the specification requires non-prefixed elements to be placed in the default namespace.
(package private)  java.util.Vector processSIMPLEPATTERNLIST(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_SIMPLEPATTERNLIST into a vector of XPath match patterns.
(package private)  StringVector processSTRINGLIST(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value)
          Process an attribute string of type T_STRINGLIST into a vector of XPath match patterns.
(package private)  java.lang.Object processURL(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute string of type T_URL into a URL value.
(package private)  java.lang.Object processValue(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value, ElemTemplateElement owner)
          Process an attribute value.
private  java.lang.Boolean processYESNO(StylesheetHandler handler, java.lang.String uri, java.lang.String name, java.lang.String rawName, java.lang.String value)
          Process an attribute string of type T_YESNO into a Boolean value.
(package private)  boolean setAttrValue(StylesheetHandler handler, java.lang.String attrUri, java.lang.String attrLocalName, java.lang.String attrRawName, java.lang.String attrValue, ElemTemplateElement elem)
          Set a value on an attribute.
(package private)  void setDefAttrValue(StylesheetHandler handler, ElemTemplateElement elem)
          Set the default value of an attribute.
(package private)  void setDefault(java.lang.String def)
          Set the default value for this attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FATAL

static final int FATAL
See Also:
Constant Field Values

ERROR

static final int ERROR
See Also:
Constant Field Values

WARNING

static final int WARNING
See Also:
Constant Field Values

T_CDATA

static final int T_CDATA
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_URL

static final int T_URL
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_AVT

static final int T_AVT
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_PATTERN

static final int T_PATTERN
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_EXPR

static final int T_EXPR
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_CHAR

static final int T_CHAR
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_NUMBER

static final int T_NUMBER
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_YESNO

static final int T_YESNO
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_QNAME

static final int T_QNAME
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_QNAMES

static final int T_QNAMES
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_ENUM

static final int T_ENUM
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_SIMPLEPATTERNLIST

static final int T_SIMPLEPATTERNLIST
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_NMTOKEN

static final int T_NMTOKEN
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_STRINGLIST

static final int T_STRINGLIST
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_PREFIX_URLLIST

static final int T_PREFIX_URLLIST
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_ENUM_OR_PQNAME

static final int T_ENUM_OR_PQNAME
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_NCNAME

static final int T_NCNAME
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_AVT_QNAME

static final int T_AVT_QNAME
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_QNAMES_RESOLVE_NULL

static final int T_QNAMES_RESOLVE_NULL
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

T_PREFIXLIST

static final int T_PREFIXLIST
Type values that represent XSLT attribute types.

See Also:
Constant Field Values

m_foreignAttr

static final XSLTAttributeDef m_foreignAttr
Representation for an attribute in a foreign namespace.


S_FOREIGNATTR_SETTER

static final java.lang.String S_FOREIGNATTR_SETTER
Method name that objects may implement if they wish to have forein attributes set.

See Also:
Constant Field Values

m_namespace

private java.lang.String m_namespace
The allowed namespace for this element.


m_name

private java.lang.String m_name
The name of this element.


m_type

private int m_type
The type of this attribute value.


m_enums

private StringToIntTable m_enums
If this element is of type T_ENUM, this will contain a map from the attribute string to the Xalan integer value.


m_default

private java.lang.String m_default
The default value for this attribute.


m_required

private boolean m_required
If true, this is a required attribute.


m_supportsAVT

private boolean m_supportsAVT
If true, this is attribute supports AVT's.


m_errorType

int m_errorType

m_setterString

java.lang.String m_setterString
String that should represent the setter method which which may be used on objects to set a value that represents this attribute

Constructor Detail

XSLTAttributeDef

XSLTAttributeDef(java.lang.String namespace,
                 java.lang.String name,
                 int type,
                 boolean required,
                 boolean supportsAVT,
                 int errorType)
Construct an instance of XSLTAttributeDef.

Parameters:
namespace - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
type - One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, T_NUMBER, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST, T_ENUM_OR_PQNAME, T_NCNAME.
required - true if this is attribute is required by the XSLT specification.
supportsAVT - true if this attribute supports AVT's.
errorType - the type of error to issue if validation fails. One of FATAL, ERROR, WARNING.

XSLTAttributeDef

XSLTAttributeDef(java.lang.String namespace,
                 java.lang.String name,
                 int type,
                 boolean supportsAVT,
                 int errorType,
                 java.lang.String defaultVal)
Construct an instance of XSLTAttributeDef.

Parameters:
namespace - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
type - One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, T_NUMBER, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST, T_ENUM_OR_PQNAME, T_NCNAME.
supportsAVT - true if this attribute supports AVT's.
errorType - the type of error to issue if validation fails. One of FATAL, ERROR, WARNING.
defaultVal - The default value for this attribute.

XSLTAttributeDef

XSLTAttributeDef(java.lang.String namespace,
                 java.lang.String name,
                 boolean required,
                 boolean supportsAVT,
                 boolean prefixedQNameValAllowed,
                 int errorType,
                 java.lang.String k1,
                 int v1,
                 java.lang.String k2,
                 int v2)
Construct an instance of XSLTAttributeDef that uses two enumerated values.

Parameters:
namespace - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
required - true if this attribute is required by the XSLT specification.
supportsAVT - true if this attribute supports AVT's.
prefixedQNameValAllowed - If true, the type is T_ENUM_OR_PQNAME
errorType - the type of error to issue if validation fails. One of FATAL, ERROR, WARNING.
k1 - The XSLT name of the enumerated value.
v1 - An integer representation of k1.
k2 - The XSLT name of the enumerated value.
v2 - An integer representation of k2.

XSLTAttributeDef

XSLTAttributeDef(java.lang.String namespace,
                 java.lang.String name,
                 boolean required,
                 boolean supportsAVT,
                 boolean prefixedQNameValAllowed,
                 int errorType,
                 java.lang.String k1,
                 int v1,
                 java.lang.String k2,
                 int v2,
                 java.lang.String k3,
                 int v3)
Construct an instance of XSLTAttributeDef that uses three enumerated values.

Parameters:
namespace - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
required - true if this attribute is required by the XSLT specification.
supportsAVT - true if this attribute supports AVT's.
prefixedQNameValAllowed - If true, the type is T_ENUM_OR_PQNAME
errorType - the type of error to issue if validation fails. One of FATAL, ERROR, WARNING. *
k1 - The XSLT name of the enumerated value.
v1 - An integer representation of k1.
k2 - The XSLT name of the enumerated value.
v2 - An integer representation of k2.
k3 - The XSLT name of the enumerated value.
v3 - An integer representation of k3.

XSLTAttributeDef

XSLTAttributeDef(java.lang.String namespace,
                 java.lang.String name,
                 boolean required,
                 boolean supportsAVT,
                 boolean prefixedQNameValAllowed,
                 int errorType,
                 java.lang.String k1,
                 int v1,
                 java.lang.String k2,
                 int v2,
                 java.lang.String k3,
                 int v3,
                 java.lang.String k4,
                 int v4)
Construct an instance of XSLTAttributeDef that uses three enumerated values.

Parameters:
namespace - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
required - true if this attribute is required by the XSLT specification.
supportsAVT - true if this attribute supports AVT's.
prefixedQNameValAllowed - If true, the type is T_ENUM_OR_PQNAME
errorType - the type of error to issue if validation fails. One of FATAL, ERROR, WARNING. * @param k1 The XSLT name of the enumerated value.
v1 - An integer representation of k1.
k2 - The XSLT name of the enumerated value.
v2 - An integer representation of k2.
k3 - The XSLT name of the enumerated value.
v3 - An integer representation of k3.
k4 - The XSLT name of the enumerated value.
v4 - An integer representation of k4.
Method Detail

getNamespace

java.lang.String getNamespace()
Get the allowed namespace for this attribute.

Returns:
The allowed namespace for this attribute, which may be null, or may be "*".

getName

java.lang.String getName()
Get the name of this attribute.

Returns:
non-null reference to the name of this attribute, which may be "*".

getType

int getType()
Get the type of this attribute value.

Returns:
One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, T_NUMBER, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST, T_ENUM_OR_PQNAME.

getEnum

private int getEnum(java.lang.String key)
If this element is of type T_ENUM, this will return a map from the attribute string to the Xalan integer value.

Parameters:
key - The XSLT attribute value.
Returns:
The integer representation of the enumerated value for this attribute.
Throws:
Throws - NullPointerException if m_enums is null.

getEnumNames

private java.lang.String[] getEnumNames()
If this element is of type T_ENUM, this will return an array of strings - the values in the enumeration

Returns:
An array of the enumerated values permitted for this attribute.
Throws:
Throws - NullPointerException if m_enums is null.

getDefault

java.lang.String getDefault()
Get the default value for this attribute.

Returns:
The default value for this attribute, or null.

setDefault

void setDefault(java.lang.String def)
Set the default value for this attribute.

Parameters:
def - String representation of the default value for this attribute.

getRequired

boolean getRequired()
Get whether or not this is a required attribute.

Returns:
true if this is a required attribute.

getSupportsAVT

boolean getSupportsAVT()
Get whether or not this attribute supports AVT's.

Returns:
true if this attribute supports AVT's.

getErrorType

int getErrorType()
Get the type of error message to use if the attribute value is invalid.

Returns:
one of XSLAttributeDef.FATAL, XSLAttributeDef.ERROR, XSLAttributeDef.WARNING

getSetterMethodName

public java.lang.String getSetterMethodName()
Return a string that should represent the setter method. The setter method name will be created algorithmically the first time this method is accessed, and then cached for return by subsequent invocations of this method.

Returns:
String that should represent the setter method which which may be used on objects to set a value that represents this attribute, of null if no setter method should be called.

processAVT

AVT processAVT(StylesheetHandler handler,
               java.lang.String uri,
               java.lang.String name,
               java.lang.String rawName,
               java.lang.String value,
               ElemTemplateElement owner)
         throws org.xml.sax.SAXException
Process an attribute string of type T_AVT into a AVT value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - Should be an Attribute Value Template string.
Returns:
An AVT object that may be used to evaluate the Attribute Value Template.
Throws:
org.xml.sax.SAXException - which will wrap a TransformerException, if there is a syntax error in the attribute value template string.

processCDATA

java.lang.Object processCDATA(StylesheetHandler handler,
                              java.lang.String uri,
                              java.lang.String name,
                              java.lang.String rawName,
                              java.lang.String value,
                              ElemTemplateElement owner)
                        throws org.xml.sax.SAXException
Process an attribute string of type T_CDATA into a String value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - non-null string reference.
Returns:
The value argument.
Throws:
org.xml.sax.SAXException.
org.xml.sax.SAXException

processCHAR

java.lang.Object processCHAR(StylesheetHandler handler,
                             java.lang.String uri,
                             java.lang.String name,
                             java.lang.String rawName,
                             java.lang.String value,
                             ElemTemplateElement owner)
                       throws org.xml.sax.SAXException
Process an attribute string of type T_CHAR into a Character value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - Should be a string with a length of 1.
Returns:
Character object.
Throws:
org.xml.sax.SAXException - if the string is not a length of 1.

processENUM

java.lang.Object processENUM(StylesheetHandler handler,
                             java.lang.String uri,
                             java.lang.String name,
                             java.lang.String rawName,
                             java.lang.String value,
                             ElemTemplateElement owner)
                       throws org.xml.sax.SAXException
Process an attribute string of type T_ENUM into a int value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - non-null string that represents an enumerated value that is valid for this element.
owner -
Returns:
An Integer representation of the enumerated value if this attribute does not support AVT. Otherwise, and AVT is returned.
Throws:
org.xml.sax.SAXException

processENUM_OR_PQNAME

java.lang.Object processENUM_OR_PQNAME(StylesheetHandler handler,
                                       java.lang.String uri,
                                       java.lang.String name,
                                       java.lang.String rawName,
                                       java.lang.String value,
                                       ElemTemplateElement owner)
                                 throws org.xml.sax.SAXException
Process an attribute string of that is either an enumerated value or a qname-but-not-ncname. Returns an AVT, if this attribute support AVT; otherwise returns int or qname.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - non-null string that represents an enumerated value that is valid for this element.
owner -
Returns:
AVT if attribute supports AVT. An Integer representation of the enumerated value if attribute does not support AVT and an enumerated value was used. Otherwise a qname is returned.
Throws:
org.xml.sax.SAXException

processEXPR

java.lang.Object processEXPR(StylesheetHandler handler,
                             java.lang.String uri,
                             java.lang.String name,
                             java.lang.String rawName,
                             java.lang.String value,
                             ElemTemplateElement owner)
                       throws org.xml.sax.SAXException
Process an attribute string of type T_EXPR into an XPath value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - An XSLT expression string.
Returns:
an XPath object that may be used for evaluation.
Throws:
org.xml.sax.SAXException - that wraps a TransformerException if the expression string contains a syntax error.

processNMTOKEN

java.lang.Object processNMTOKEN(StylesheetHandler handler,
                                java.lang.String uri,
                                java.lang.String name,
                                java.lang.String rawName,
                                java.lang.String value,
                                ElemTemplateElement owner)
                          throws org.xml.sax.SAXException
Process an attribute string of type T_NMTOKEN into a String value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A NMTOKEN string.
Returns:
the value argument or an AVT if this attribute supports AVTs.
Throws:
org.xml.sax.SAXException - if the value is not a valid nmtoken

processPATTERN

java.lang.Object processPATTERN(StylesheetHandler handler,
                                java.lang.String uri,
                                java.lang.String name,
                                java.lang.String rawName,
                                java.lang.String value,
                                ElemTemplateElement owner)
                          throws org.xml.sax.SAXException
Process an attribute string of type T_PATTERN into an XPath match pattern value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A match pattern string.
Returns:
An XPath pattern that may be used to evaluate the XPath.
Throws:
org.xml.sax.SAXException - that wraps a TransformerException if the match pattern string contains a syntax error.

processNUMBER

java.lang.Object processNUMBER(StylesheetHandler handler,
                               java.lang.String uri,
                               java.lang.String name,
                               java.lang.String rawName,
                               java.lang.String value,
                               ElemTemplateElement owner)
                         throws org.xml.sax.SAXException
Process an attribute string of type T_NUMBER into a double value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A string that can be parsed into a double value.
number -
Returns:
A Double object.
Throws:
org.xml.sax.SAXException - that wraps a TransformerException if the string does not contain a parsable number.

processQNAME

java.lang.Object processQNAME(StylesheetHandler handler,
                              java.lang.String uri,
                              java.lang.String name,
                              java.lang.String rawName,
                              java.lang.String value,
                              ElemTemplateElement owner)
                        throws org.xml.sax.SAXException
Process an attribute string of type T_QNAME into a QName value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A string that represents a potentially prefix qualified name.
owner -
Returns:
A QName object if this attribute does not support AVT's. Otherwise, an AVT is returned.
Throws:
org.xml.sax.SAXException - if the string contains a prefix that can not be resolved, or the string contains syntax that is invalid for a qualified name.

processAVT_QNAME

java.lang.Object processAVT_QNAME(StylesheetHandler handler,
                                  java.lang.String uri,
                                  java.lang.String name,
                                  java.lang.String rawName,
                                  java.lang.String value,
                                  ElemTemplateElement owner)
                            throws org.xml.sax.SAXException
Process an attribute string of type T_QNAME into a QName value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A string that represents a potentially prefix qualified name.
owner -
Returns:
An AVT is returned.
Throws:
org.xml.sax.SAXException - if the string contains a prefix that can not be resolved, or the string contains syntax that is invalid for a qualified name.

processNCNAME

java.lang.Object processNCNAME(StylesheetHandler handler,
                               java.lang.String uri,
                               java.lang.String name,
                               java.lang.String rawName,
                               java.lang.String value,
                               ElemTemplateElement owner)
                         throws org.xml.sax.SAXException
Process an attribute string of type NCName into a String

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A string that represents a potentially prefix qualified name.
owner -
Returns:
A String object if this attribute does not support AVT's. Otherwise, an AVT is returned.
Throws:
org.xml.sax.SAXException - if the string contains a prefix that can not be resolved, or the string contains syntax that is invalid for a NCName.

processQNAMES

java.util.Vector processQNAMES(StylesheetHandler handler,
                               java.lang.String uri,
                               java.lang.String name,
                               java.lang.String rawName,
                               java.lang.String value)
                         throws org.xml.sax.SAXException
Process an attribute string of type T_QNAMES into a vector of QNames where the specification requires that non-prefixed elements not be placed in a namespace. (See section 2.4 of XSLT 1.0.)

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A whitespace delimited list of qualified names.
Returns:
a Vector of QName objects.
Throws:
org.xml.sax.SAXException - if the one of the qualified name strings contains a prefix that can not be resolved, or a qualified name contains syntax that is invalid for a qualified name.

processQNAMESRNU

final java.util.Vector processQNAMESRNU(StylesheetHandler handler,
                                        java.lang.String uri,
                                        java.lang.String name,
                                        java.lang.String rawName,
                                        java.lang.String value)
                                 throws org.xml.sax.SAXException
Process an attribute string of type T_QNAMES_RESOLVE_NULL into a vector of QNames where the specification requires non-prefixed elements to be placed in the default namespace. (See section 16 of XSLT 1.0; the only time that this will get called is for the cdata-section-elements attribute on xsl:output.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A whitespace delimited list of qualified names.
Returns:
a Vector of QName objects.
Throws:
org.xml.sax.SAXException - if the one of the qualified name strings contains a prefix that can not be resolved, or a qualified name contains syntax that is invalid for a qualified name.

processSIMPLEPATTERNLIST

java.util.Vector processSIMPLEPATTERNLIST(StylesheetHandler handler,
                                          java.lang.String uri,
                                          java.lang.String name,
                                          java.lang.String rawName,
                                          java.lang.String value,
                                          ElemTemplateElement owner)
                                    throws org.xml.sax.SAXException
Process an attribute string of type T_SIMPLEPATTERNLIST into a vector of XPath match patterns.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A whitespace delimited list of simple match patterns.
Returns:
A Vector of XPath objects.
Throws:
org.xml.sax.SAXException - that wraps a TransformerException if one of the match pattern strings contains a syntax error.

processSTRINGLIST

StringVector processSTRINGLIST(StylesheetHandler handler,
                               java.lang.String uri,
                               java.lang.String name,
                               java.lang.String rawName,
                               java.lang.String value)
Process an attribute string of type T_STRINGLIST into a vector of XPath match patterns.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - a whitespace delimited list of string values.
Returns:
A StringVector of the tokenized strings.

processPREFIX_URLLIST

StringVector processPREFIX_URLLIST(StylesheetHandler handler,
                                   java.lang.String uri,
                                   java.lang.String name,
                                   java.lang.String rawName,
                                   java.lang.String value)
                             throws org.xml.sax.SAXException
Process an attribute string of type T_URLLIST into a vector of prefixes that may be resolved to URLs.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A list of whitespace delimited prefixes.
Returns:
A vector of strings that may be resolved to URLs.
Throws:
org.xml.sax.SAXException - if one of the prefixes can not be resolved.

processPREFIX_LIST

StringVector processPREFIX_LIST(StylesheetHandler handler,
                                java.lang.String uri,
                                java.lang.String name,
                                java.lang.String rawName,
                                java.lang.String value)
                          throws org.xml.sax.SAXException
Process an attribute string of type T_PREFIXLIST into a vector of prefixes that may be resolved to URLs.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A list of whitespace delimited prefixes.
Returns:
A vector of strings that may be resolved to URLs.
Throws:
org.xml.sax.SAXException - if one of the prefixes can not be resolved.

processURL

java.lang.Object processURL(StylesheetHandler handler,
                            java.lang.String uri,
                            java.lang.String name,
                            java.lang.String rawName,
                            java.lang.String value,
                            ElemTemplateElement owner)
                      throws org.xml.sax.SAXException
Process an attribute string of type T_URL into a URL value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - non-null string that conforms to the URL syntax.
Returns:
The non-absolutized URL argument, in other words, the value argument. If this attribute supports AVT, an AVT is returned.
Throws:
org.xml.sax.SAXException - if the URL does not conform to the URL syntax.

processYESNO

private java.lang.Boolean processYESNO(StylesheetHandler handler,
                                       java.lang.String uri,
                                       java.lang.String name,
                                       java.lang.String rawName,
                                       java.lang.String value)
                                throws org.xml.sax.SAXException
Process an attribute string of type T_YESNO into a Boolean value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - A string that should be "yes" or "no".
Returns:
Boolean object representation of the value.
Throws:
org.xml.sax.SAXException

processValue

java.lang.Object processValue(StylesheetHandler handler,
                              java.lang.String uri,
                              java.lang.String name,
                              java.lang.String rawName,
                              java.lang.String value,
                              ElemTemplateElement owner)
                        throws org.xml.sax.SAXException
Process an attribute value.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
uri - The Namespace URI, or an empty string.
name - The local name (without prefix), or empty string if not namespace processing.
rawName - The qualified name (with prefix).
value - The unprocessed string value of the attribute.
Returns:
The processed Object representation of the attribute.
Throws:
org.xml.sax.SAXException - if the attribute value can not be processed.

setDefAttrValue

void setDefAttrValue(StylesheetHandler handler,
                     ElemTemplateElement elem)
               throws org.xml.sax.SAXException
Set the default value of an attribute.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
elem - The object on which the property will be set.
Throws:
org.xml.sax.SAXException - wraps an invocation exception if the setter method can not be invoked on the object.

getPrimativeClass

private java.lang.Class getPrimativeClass(java.lang.Object obj)
Get the primative type for the class, if there is one. If the class is a Double, for instance, this will return double.class. If the class is not one of the 9 primative types, it will return the same class that was passed in.

Parameters:
obj - The object which will be resolved to a primative class object if possible.
Returns:
The most primative class representation possible for the object, never null.

getListOfEnums

private java.lang.StringBuffer getListOfEnums()
StringBuffer containing comma delimited list of valid values for ENUM type. Used to build error message.


setAttrValue

boolean setAttrValue(StylesheetHandler handler,
                     java.lang.String attrUri,
                     java.lang.String attrLocalName,
                     java.lang.String attrRawName,
                     java.lang.String attrValue,
                     ElemTemplateElement elem)
               throws org.xml.sax.SAXException
Set a value on an attribute.

Parameters:
handler - non-null reference to current StylesheetHandler that is constructing the Templates.
attrUri - The Namespace URI of the attribute, or an empty string.
attrLocalName - The local name (without prefix), or empty string if not namespace processing.
attrRawName - The raw name of the attribute, including possible prefix.
attrValue - The attribute's value.
elem - The object that should contain a property that represents the attribute.
Throws:
org.xml.sax.SAXException

handleError

private void handleError(StylesheetHandler handler,
                         java.lang.String msg,
                         java.lang.Object[] args,
                         java.lang.Exception exc)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException