public class XSLNumber extends 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 and Description |
|---|
XSLNumber()
Creates a new XSLNumber Object
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
doNumbering(XPathNode node,
ProcessorState ps)
Performs the numbering of the given XPathNode
|
java.lang.String |
getFormattedNumber(XPathNode node,
ProcessorState ps)
Performs the numbering of the given XPathNode and
returns the number using the format of this XSLNumber.
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the attribute with the given name to the given value.
|
void |
setCountAttr(java.lang.String count)
Sets the count expression of this XSLNumber
|
void |
setFormatAttr(java.lang.String format)
Sets the format pattern of this XSLNumber
|
void |
setFromAttr(java.lang.String from) |
void |
setLevel(java.lang.String level)
Sets the level of numbering for this XSLNumber
|
addNamespaceDecl, appendAction, appendText, appendText, getActions, getAttribute, getAttributes, getNamespace, getNearestAncestor, getNodeValue, getStylesheet, getText, getType, getTypeFromName, getTypeName, resolveNamespace, setAllowActions, setNamespace, setTypeNamepublic int[] doNumbering(XPathNode node, ProcessorState ps) throws XPathException
XPathNode - the XPathNode to perform numbering on.
[This must be of type XPathNode.ELEMENT]XPathExceptionpublic java.lang.String getFormattedNumber(XPathNode node, ProcessorState ps)
node - the XPathNode to get the number of. This node
must be of type XPathNode.ELEMENT.public void setAttribute(java.lang.String name,
java.lang.String value)
throws XSLException
XSLObjectsetAttribute in class XSLObjectname - the name of the attribute to setvalue - the value to set the attribute toXSLException - if this XSLObject does not allow attributes
with the given name, or if the attribute is read onlyXSLObjectpublic void setCountAttr(java.lang.String count)
count - the String value to use as the count expr
expression of this XSLNumberpublic void setFormatAttr(java.lang.String format)
format - the Number Format to usepublic void setFromAttr(java.lang.String from)
public void setLevel(java.lang.String level)
level - the desired level.
Levels are "single", "multi", or "any"