org.exolab.adaptx.xslt
Class XSLText

java.lang.Object
  extended by org.exolab.adaptx.xslt.XSLObject
      extended by org.exolab.adaptx.xslt.XSLText
Direct Known Subclasses:
XSLCData, XSLScript

public class XSLText
extends XSLObject

Represents the xsl:text element

Author:
Keith Visco

Field Summary
 
Fields inherited from class org.exolab.adaptx.xslt.XSLObject
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, OUTPUT, PARAM, PI, PRESERVE_SPACE, SCRIPT, SORT, STRIP_SPACE, STYLESHEET, TEMPLATE, TEXT, VALUE_OF, VARIABLE, WHEN, WITH_PARAM
 
Constructor Summary
XSLText()
          Creates a new XSLText element, with no data
XSLText(java.lang.String data)
          Creates a new XSLText with the given data
 
Method Summary
 void appendText(char[] chars, int start, int length)
          Appends the given String to the existing data of this XSLText
 void appendText(java.lang.String data)
          Appends the given String to the existing data of this XSLText
 boolean disableOutputEscaping()
          Returns true if the text should not be escaped
 java.lang.String getText()
          Retrieves the text data of this XSLText
 void setAttribute(java.lang.String name, java.lang.String value)
          Sets the attribute with the given name to the given value.
 void setText(char[] chars, int start, int length)
          Sets the text data of this XSLText
 void setText(java.lang.String data)
          Sets the text data of this XSLText
 
Methods inherited from class org.exolab.adaptx.xslt.XSLObject
addNamespaceDecl, appendAction, getActions, getAttribute, getAttributes, getNamespace, getNearestAncestor, getNodeValue, getStylesheet, getText, getType, getTypeFromName, getTypeName, resolveNamespace, setAllowActions, setNamespace, setTypeName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLText

public XSLText()
Creates a new XSLText element, with no data

Parameters:
parentStylesheet - the XSL Stylesheet in which this XSLText is to be added

XSLText

public XSLText(java.lang.String data)
Creates a new XSLText with the given data

Parameters:
parentStylesheet - the XSL Stylesheet in which this XSLText is to be added
data - the value of this XSLText object
Method Detail

appendText

public void appendText(java.lang.String data)
Appends the given String to the existing data of this XSLText

Overrides:
appendText in class XSLObject
Parameters:
data - the String to append

appendText

public void appendText(char[] chars,
                       int start,
                       int length)
Appends the given String to the existing data of this XSLText

Overrides:
appendText in class XSLObject
Parameters:
chars - an array of characters containing the data to apoend to this XSLText.
start - the start index into the character array
length - the number of characters

disableOutputEscaping

public boolean disableOutputEscaping()
Returns true if the text should not be escaped

Returns:
true if the text should not be escaped

getText

public java.lang.String getText()
Retrieves the text data of this XSLText

Returns:
the data of this XSLText

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws XSLException
Sets the attribute with the given name to the given value.

Overrides:
setAttribute in class XSLObject
Parameters:
name - the name of the attribute to set
value - the value to set the attribute to
Throws:
XSLException - if this XSLObject does not allow attributes with the given name, or if the attribute is read only

setText

public void setText(java.lang.String data)
Sets the text data of this XSLText

Parameters:
data - the String to set the data of this XSLText to.

setText

public void setText(char[] chars,
                    int start,
                    int length)
Sets the text data of this XSLText

Parameters:
chars - an array of characters containing the data for this XSLText.
start - the start index into the character array
length - the number of characters