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
-
APPLY_IMPORTS
-
-
APPLY_TEMPLATES
-
-
ARG
-
-
ATTRIBUTE
-
-
ATTRIBUTE_SET
-
-
CALL_TEMPLATE
-
-
CDATA
-
-
CHOOSE
-
-
COMMENT
-
-
CONTENTS
-
-
COPY
-
-
COPY_OF
-
-
ELEMENT
-
-
ENTITY_REF
-
-
FOR_EACH
-
-
FUNCTIONS
-
-
ID
-
-
IF
-
-
IMPORT
-
-
INCLUDE
-
-
KEY
-
-
LITERAL
-
-
LOCALE
-
-
MESSAGE
-
-
NUMBER
-
-
OTHERWISE
-
-
PARAM
-
-
PARAM_VARIABLE
-
-
PI
-
-
PRESERVE_SPACE
-
-
SCRIPT
-
-
SORT
-
-
STRIP_SPACE
-
-
STYLESHEET
-
-
TEMPLATE
-
-
TEXT
-
-
USE
-
-
VALUE_OF
-
-
VARIABLE
-
-
WHEN
-
-
XSLObject(XSLStylesheet, short)
- Creates an XSLObject using the specified type
-
appendAction(XSLObject)
- Appends the given XSLObject to this XSLObject's list of
actions
-
getActions()
- Returns the list of actions for this XSLObject
-
getAttribute(String)
- Returns the value of the attribute whose name is equal to the given name.
-
getAttributeAsAVT(String)
- Returns the value of the specified attribute as an AttributeValueTemplate
-
getAttributeNames()
- Returns an Enumeration of the names of the attributes of this
XSLObject
-
getNearestAncestor(short)
- Returns the nearest ancestor of this XSLObject that is of the given
type.
-
getNodeValue(Node)
- Returns the String value of a DOM Node.
-
getParentStylesheet()
- Returns the parent XSLStylesheet of this XSLObject
-
getText(Element)
- Retrieves the text of an Element
-
getType()
- Returns the type of XSLObject this Object represents
-
getTypeFromName(String)
- Returns the type of XSL Object that has the given name
-
getTypeName()
- Returns the name of this XSLObject
-
setAllowActions(boolean)
-
-
setAttribute(String, String)
- Sets the attribute with the given name to the given value.
-
setTypeName(String)
-
APPLY_IMPORTS
public static final short APPLY_IMPORTS
APPLY_TEMPLATES
public static final short APPLY_TEMPLATES
ARG
public static final short ARG
ATTRIBUTE
public static final short ATTRIBUTE
ATTRIBUTE_SET
public static final short ATTRIBUTE_SET
CALL_TEMPLATE
public static final short CALL_TEMPLATE
CDATA
public static final short CDATA
CHOOSE
public static final short CHOOSE
COMMENT
public static final short COMMENT
CONTENTS
public static final short CONTENTS
COPY
public static final short COPY
COPY_OF
public static final short COPY_OF
ELEMENT
public static final short ELEMENT
FOR_EACH
public static final short FOR_EACH
FUNCTIONS
public static final short FUNCTIONS
ID
public static final short ID
IF
public static final short IF
IMPORT
public static final short IMPORT
INCLUDE
public static final short INCLUDE
KEY
public static final short KEY
LITERAL
public static final short LITERAL
LOCALE
public static final short LOCALE
MESSAGE
public static final short MESSAGE
NUMBER
public static final short NUMBER
OTHERWISE
public static final short OTHERWISE
PARAM
public static final short PARAM
PARAM_VARIABLE
public static final short PARAM_VARIABLE
PI
public static final short PI
PRESERVE_SPACE
public static final short PRESERVE_SPACE
SORT
public static final short SORT
STRIP_SPACE
public static final short STRIP_SPACE
STYLESHEET
public static final short STYLESHEET
TEMPLATE
public static final short TEMPLATE
TEXT
public static final short TEXT
USE
public static final short USE
VALUE_OF
public static final short VALUE_OF
VARIABLE
public static final short VARIABLE
WHEN
public static final short WHEN
ENTITY_REF
public static final short ENTITY_REF
SCRIPT
public static final short SCRIPT
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
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
getActions
public List getActions()
- Returns the list of actions for this XSLObject
- Returns:
- the list of actions for this XSLObject
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.
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
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
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.
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
getParentStylesheet
public XSLStylesheet getParentStylesheet()
- Returns the parent XSLStylesheet of this XSLObject
- Returns:
- the parent XSLStylesheet of this XSLObject
getText
public static String getText(Element element)
- Retrieves the text of an Element
- Returns:
- the text of the given Element
- See Also:
- Element
getType
public final short getType()
- Returns the type of XSLObject this Object represents
- Returns:
- the type of XSLObject that this Object represents
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
getTypeName
public String getTypeName()
- Returns the name of this XSLObject
- Returns:
- the name of this XSLObject
setAllowActions
public void setAllowActions(boolean allow)
setTypeName
public void setTypeName(String name)
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