org.apache.xalan.xslt
Class ElemNumber
java.lang.Object
|
+--org.apache.xalan.xslt.UnImplNode
|
+--org.apache.xalan.xslt.ElemTemplateElement
|
+--org.apache.xalan.xslt.ElemNumber
- public class ElemNumber
- extends ElemTemplateElement
Implement xsl:number.
- See Also:
- Serialized Form
Method Summary |
Node |
appendChild(Node newChild)
Add a child to the child list. |
void |
execute(XSLTEngineImpl processor,
Node sourceTree,
Node sourceNode,
QName mode)
Execute the element's primary function. |
int |
getXSLToken()
Get an integer representation of the element type. |
protected void |
int2alphaCount(int val,
char[] aTable,
java.lang.StringBuffer stringBuf)
Convert a long integer into alphabetic counting, in other words
count using the sequence A B C ... |
protected java.lang.String |
int2singlealphaCount(int val,
char[] table)
Convert a long integer into alphabetic counting, in other words
count using the sequence A B C ... |
protected java.lang.String |
long2roman(long val,
boolean prefixesAreOK)
Convert a long integer into roman numerals. |
protected java.lang.String |
tradAlphaCount(int val,
XSLTResourceBundle thisBundle)
Convert a long integer into traditional alphabetic counting, in other words
count using the traditional numbering. |
Methods inherited from class org.apache.xalan.xslt.ElemTemplateElement |
childrenToString,
error,
executeChildren,
getBaseIdentifier,
getChildNodes,
getFirstChild,
getLastChild,
getLength,
getNamespaceForPrefix,
getNamespaceForPrefix,
getNextSibling,
getNodeName,
getNodeType,
getOwnerDocument,
getParentNode,
getTagName,
hasChildNodes,
isSpace,
isWhiteSpace,
item,
processLocatedNode,
processPrefixControl,
shouldExcludeResultNamespaceNode,
transformSelectedChildren |
Methods inherited from class org.apache.xalan.xslt.UnImplNode |
cloneNode,
getAttribute,
getAttributeNode,
getAttributeNodeNS,
getAttributeNS,
getAttributes,
getElementsByTagName,
getElementsByTagNameNS,
getLocalName,
getNamespaceURI,
getNodeValue,
getPrefix,
getPreviousSibling,
hasAttribute,
hasAttributeNS,
hasAttributes,
insertBefore,
isSupported,
normalize,
removeAttribute,
removeAttributeNode,
removeAttributeNS,
removeChild,
replaceChild,
setAttribute,
setAttributeNode,
setAttributeNodeNS,
setAttributeNS,
setNodeValue,
setPrefix,
supports |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
m_countMatchPattern
public XPath m_countMatchPattern
- Only nodes are counted that match this pattern.
m_fromMatchPattern
public XPath m_fromMatchPattern
- Specifies where to count from.
For level="single" or level="multiple":
Only ancestors that are searched are
those that are descendants of the nearest ancestor that matches
the from pattern.
For level="any:
Only nodes after the first node before the
current node that match the from pattern are considered.
m_level
public int m_level
- When level="single", it goes up to the first node in the ancestor-or-self axis
that matches the count pattern, and constructs a list of length one containing
one plus the number of preceding siblings of that ancestor that match the count
pattern. If there is no such ancestor, it constructs an empty list. If the from
attribute is specified, then the only ancestors that are searched are those
that are descendants of the nearest ancestor that matches the from pattern.
Preceding siblings has the same meaning here as with the preceding-sibling axis.
When level="multiple", it constructs a list of all ancestors of the current node
in document order followed by the element itself; it then selects from the list
those nodes that match the count pattern; it then maps each node in the list to
one plus the number of preceding siblings of that node that match the count pattern.
If the from attribute is specified, then the only ancestors that are searched are
those that are descendants of the nearest ancestor that matches the from pattern.
Preceding siblings has the same meaning here as with the preceding-sibling axis.
When level="any", it constructs a list of length one containing the number of
nodes that match the count pattern and belong to the set containing the current
node and all nodes at any level of the document that are before the current node
in document order, excluding any namespace and attribute nodes (in other words
the union of the members of the preceding and ancestor-or-self axes). If the
from attribute is specified, then only nodes after the first node before the
current node that match the from pattern are considered.
m_valueExpr
public XPath m_valueExpr
- The value attribute contains an expression. The expression is evaluated
and the resulting object is converted to a number as if by a call to the
number function.
m_format_avt
public AVT m_format_avt
m_lang_avt
public AVT m_lang_avt
m_lettervalue_avt
public AVT m_lettervalue_avt
m_groupingSeparator_avt
public AVT m_groupingSeparator_avt
m_groupingSize_avt
public AVT m_groupingSize_avt
ElemNumber
public ElemNumber(XSLTEngineImpl processor,
Stylesheet stylesheetTree,
java.lang.String name,
AttributeList atts,
int lineNumber,
int columnNumber)
throws SAXException
getXSLToken
public int getXSLToken()
- Description copied from class: ElemTemplateElement
- Get an integer representation of the element type.
- Overrides:
- getXSLToken in class ElemTemplateElement
- Tags copied from class: ElemTemplateElement
- Returns:
- An integer representation of the element, defined in the
Constants class.
- See Also:
Constants.java
execute
public void execute(XSLTEngineImpl processor,
Node sourceTree,
Node sourceNode,
QName mode)
throws XSLProcessorException,
java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException,
SAXException
- Description copied from class: ElemTemplateElement
- Execute the element's primary function. Subclasses of this
function may recursivly execute down the element tree.
- Overrides:
- execute in class ElemTemplateElement
- Tags copied from class: ElemTemplateElement
- Parameters:
processor
- The XSLT Processor.sourceTree
- The input source tree.sourceNode
- The current context node.mode
- The current mode.- Throws:
- XSLProcessorException -
- java.net.MalformedURLException -
- java.io.FileNotFoundException -
- java.io.IOException -
- SAXException -
appendChild
public Node appendChild(Node newChild)
throws DOMException
- Add a child to the child list.
- Overrides:
- appendChild in class ElemTemplateElement
- Tags copied from class: ElemTemplateElement
- Parameters:
newChild
- - Throws:
- DOMException -
int2singlealphaCount
protected java.lang.String int2singlealphaCount(int val,
char[] table)
- Convert a long integer into alphabetic counting, in other words
count using the sequence A B C ... Z.
- Parameters:
val
- Value to convert -- must be greater than zero.table
- a table containing one character for each digit in the radix- Returns:
- String representing alpha count of number.
- See Also:
Note that the radix of the conversion is inferred from the size
of the table.
int2alphaCount
protected void int2alphaCount(int val,
char[] aTable,
java.lang.StringBuffer stringBuf)
- Convert a long integer into alphabetic counting, in other words
count using the sequence A B C ... Z AA AB AC.... etc.
- Parameters:
val
- Value to convert -- must be greater than zero.table
- a table containing one character for each digit in the radix- Returns:
- String representing alpha count of number.
- See Also:
Note that the radix of the conversion is inferred from the size
of the table.
tradAlphaCount
protected java.lang.String tradAlphaCount(int val,
XSLTResourceBundle thisBundle)
- Convert a long integer into traditional alphabetic counting, in other words
count using the traditional numbering.
- Parameters:
val
- Value to convert -- must be greater than zero.table
- a table containing one character for each digit in the radix- Returns:
- String representing alpha count of number.
- See Also:
Note that the radix of the conversion is inferred from the size
of the table.
long2roman
protected java.lang.String long2roman(long val,
boolean prefixesAreOK)
- Convert a long integer into roman numerals.
- Parameters:
val
- Value to convert.prefixesAreOK
- true_ to enable prefix notation (e.g. 4 = "IV"),
false_ to disable prefix notation (e.g. 4 = "IIII").- Returns:
- Roman numeral string.
- See Also:
DecimalToRoman
,
m_romanConvertTable