All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.kvisco.xsl.XSLObject

com.kvisco.xsl.XSLObject

public class XSLObject
This class represents an XSLObject in the style tree. It is the most basic of all XSLObjects and contains common functionality across different XSLObjects. I originally had this implemented as an extended W3C DOM XML Element, but due to problems with extending different implementations, and to make it more cross-DOM accessible I've chosen an this approach. Since this once was a DOM Element, you will notice many of the methods are very DOM-like.

Author:
Keith Visco

Variable Index

 o APPLY_IMPORTS
 o APPLY_TEMPLATES
 o ARG
 o ATTRIBUTE
 o ATTRIBUTE_SET
 o CALL_TEMPLATE
 o CDATA
 o CHOOSE
 o COMMENT
 o CONTENTS
 o COPY
 o COPY_OF
 o ELEMENT
 o ENTITY_REF
 o FOR_EACH
 o FUNCTIONS
 o ID
 o IF
 o IMPORT
 o INCLUDE
 o KEY
 o LITERAL
 o LOCALE
 o MESSAGE
 o NUMBER
 o OTHERWISE
 o PARAM
 o PARAM_VARIABLE
 o PI
 o PRESERVE_SPACE
 o SCRIPT
 o SORT
 o STRIP_SPACE
 o STYLESHEET
 o TEMPLATE
 o TEXT
 o USE
 o VALUE_OF
 o VARIABLE
 o WHEN

Constructor Index

 o XSLObject(XSLStylesheet, short)
Creates an XSLObject using the specified type

Method Index

 o appendAction(XSLObject)
Appends the given XSLObject to this XSLObject's list of actions
 o getActions()
Returns the list of actions for this XSLObject
 o getAttribute(String)
Returns the value of the attribute whose name is equal to the given name.
 o getAttributeAsAVT(String)
Returns the value of the specified attribute as an AttributeValueTemplate
 o getAttributeNames()
Returns an Enumeration of the names of the attributes of this XSLObject
 o getNearestAncestor(short)
Returns the nearest ancestor of this XSLObject that is of the given type.
 o getNodeValue(Node)
Returns the String value of a DOM Node.
 o getParentStylesheet()
Returns the parent XSLStylesheet of this XSLObject
 o getText(Element)
Retrieves the text of an Element
 o getType()
Returns the type of XSLObject this Object represents
 o getTypeFromName(String)
Returns the type of XSL Object that has the given name
 o getTypeName()
Returns the name of this XSLObject
 o setAllowActions(boolean)
 o setAttribute(String, String)
Sets the attribute with the given name to the given value.
 o setTypeName(String)

Variables

 o APPLY_IMPORTS
 public static final short APPLY_IMPORTS
 o APPLY_TEMPLATES
 public static final short APPLY_TEMPLATES
 o ARG
 public static final short ARG
 o ATTRIBUTE
 public static final short ATTRIBUTE
 o ATTRIBUTE_SET
 public static final short ATTRIBUTE_SET
 o CALL_TEMPLATE
 public static final short CALL_TEMPLATE
 o CDATA
 public static final short CDATA
 o CHOOSE
 public static final short CHOOSE
 o COMMENT
 public static final short COMMENT
 o CONTENTS
 public static final short CONTENTS
 o COPY
 public static final short COPY
 o COPY_OF
 public static final short COPY_OF
 o ELEMENT
 public static final short ELEMENT
 o FOR_EACH
 public static final short FOR_EACH
 o FUNCTIONS
 public static final short FUNCTIONS
 o ID
 public static final short ID
 o IF
 public static final short IF
 o IMPORT
 public static final short IMPORT
 o INCLUDE
 public static final short INCLUDE
 o KEY
 public static final short KEY
 o LITERAL
 public static final short LITERAL
 o LOCALE
 public static final short LOCALE
 o MESSAGE
 public static final short MESSAGE
 o NUMBER
 public static final short NUMBER
 o OTHERWISE
 public static final short OTHERWISE
 o PARAM
 public static final short PARAM
 o PARAM_VARIABLE
 public static final short PARAM_VARIABLE
 o PI
 public static final short PI
 o PRESERVE_SPACE
 public static final short PRESERVE_SPACE
 o SORT
 public static final short SORT
 o STRIP_SPACE
 public static final short STRIP_SPACE
 o STYLESHEET
 public static final short STYLESHEET
 o TEMPLATE
 public static final short TEMPLATE
 o TEXT
 public static final short TEXT
 o USE
 public static final short USE
 o VALUE_OF
 public static final short VALUE_OF
 o VARIABLE
 public static final short VARIABLE
 o WHEN
 public static final short WHEN
 o ENTITY_REF
 public static final short ENTITY_REF
 o SCRIPT
 public static final short SCRIPT

Constructors

 o XSLObject
 public XSLObject(XSLStylesheet parent,
                  short type)
Creates an XSLObject using the specified type

Parameters:
parentStylesheet - the owner XSLStylesheet of the new Element
type - the type of XSLObject that the new instance represents

Methods

 o appendAction
 public boolean appendAction(XSLObject xslObject)
Appends the given XSLObject to this XSLObject's list of actions

Parameters:
xslObject - the XSLObject to add to this XSLObject's list of actions
Returns:
true if the given XSLObject has been added to this XSLObject otherwise false
 o getActions
 public List getActions()
Returns the list of actions for this XSLObject

Returns:
the list of actions for this XSLObject
 o getAttribute
 public String getAttribute(String name)
Returns the value of the attribute whose name is equal to the given name.

Returns:
the value of the attribute whose name is equal to the given name or null if no attribute exist's with such a name.
 o getAttributeAsAVT
 public AttributeValueTemplate getAttributeAsAVT(String name) throws XSLException
Returns the value of the specified attribute as an AttributeValueTemplate

Returns:
the value of the specified attribute as an AttributeValueTemplate
Throws: XSLException
when the Attribute is not a valid AttrubueValueTemplate
 o getAttributeNames
 public Enumeration getAttributeNames()
Returns an Enumeration of the names of the attributes of this XSLObject

Returns:
an Enumeration of the names of the attributes of this XSLObject
 o getNearestAncestor
 public XSLObject getNearestAncestor(short type)
Returns the nearest ancestor of this XSLObject that is of the given type.

Parameters:
type - the type of ancestor to search for
Returns:
the nearest ancestor of this XSLObject that is of the given type.
 o getNodeValue
 public static String getNodeValue(Node node)
Returns the String value of a DOM Node.

Returns:
the String value of a DOM Node.
See Also:
Node
 o getParentStylesheet
 public XSLStylesheet getParentStylesheet()
Returns the parent XSLStylesheet of this XSLObject

Returns:
the parent XSLStylesheet of this XSLObject
 o getText
 public static String getText(Element element)
Retrieves the text of an Element

Returns:
the text of the given Element
See Also:
Element
 o getType
 public final short getType()
Returns the type of XSLObject this Object represents

Returns:
the type of XSLObject that this Object represents
 o getTypeFromName
 public static short getTypeFromName(String name)
Returns the type of XSL Object that has the given name

Parameters:
name - the name the XSLObject
Returns:
the type of XSL Object that has the given name
 o getTypeName
 public String getTypeName()
Returns the name of this XSLObject

Returns:
the name of this XSLObject
 o setAllowActions
 public void setAllowActions(boolean allow)
 o setTypeName
 public void setTypeName(String name)
 o setAttribute
 public void setAttribute(String name,
                          String value) throws XSLException
Sets the attribute with the given name to the given value.

Parameters:
name - the name of the attribute to set
value - the value to set the attribute to

All Packages  Class Hierarchy  This Package  Previous  Next  Index