weblogic.apache.xalan.templates
Class ElemNumber
java.lang.Object
|
+--weblogic.apache.xml.utils.UnImplNode
|
+--weblogic.apache.xalan.templates.ElemTemplateElement
|
+--weblogic.apache.xalan.templates.ElemNumber
- public class ElemNumber
- extends ElemTemplateElement
Implement xsl:number.
- Author:
- Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
- See Also:
- number in XSLT Specification, Serialized Form
Method Summary
|
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
Add a child to the child list. |
void |
execute(TransformerImpl transformer,
org.w3c.dom.Node sourceNode,
QName mode)
Execute an xsl:number instruction. |
XPath |
getCount()
Get the "count" attribute. |
AVT |
getFormat()
Get the "format" attribute. |
XPath |
getFrom()
Get the "from" attribute. |
AVT |
getGroupingSeparator()
Get the "grouping-separator" attribute. |
AVT |
getGroupingSize()
Get the "grouping-size" attribute. |
AVT |
getLang()
Get the "lang" attribute. |
AVT |
getLetterValue()
Get the "letter-value" attribute. |
int |
getLevel()
Get the "level" attribute. |
java.lang.String |
getNodeName()
Return the node name. |
org.w3c.dom.Node |
getPreviousNode(XPathContext xctxt,
org.w3c.dom.Node pos)
Get the previous node to be counted. |
org.w3c.dom.Node |
getTargetNode(XPathContext xctxt,
org.w3c.dom.Node sourceNode)
Get the target node that will be counted.. |
XPath |
getValue()
Get the "value" attribute. |
int |
getXSLToken()
Get an int constant identifying the type of element. |
protected void |
int2alphaCount(int val,
char[] aTable,
FastStringBuffer 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. |
void |
setCount(XPath v)
Set the "count" attribute. |
void |
setFormat(AVT v)
Set the "format" attribute. |
void |
setFrom(XPath v)
Set the "from" attribute. |
void |
setGroupingSeparator(AVT v)
Set the "grouping-separator" attribute. |
void |
setGroupingSize(AVT v)
Set the "grouping-size" attribute. |
void |
setLang(AVT v)
Set the "lang" attribute. |
void |
setLetterValue(AVT v)
Set the "letter-value" attribute. |
void |
setLevel(int v)
Set the "level" attribute. |
void |
setValue(XPath v)
Set the "value" attribute. |
protected java.lang.String |
tradAlphaCount(int val,
XResourceBundle thisBundle)
Convert a long integer into traditional alphabetic counting, in other words
count using the traditional numbering. |
Methods inherited from class weblogic.apache.xalan.templates.ElemTemplateElement |
canStripWhiteSpace,
compareTo,
compose,
containsExcludeResultPrefix,
error,
error,
getBaseIdentifier,
getChildNodes,
getColumnNumber,
getDeclaredPrefixes,
getDOMBackPointer,
getFirstChild,
getFirstChildElem,
getLastChild,
getLength,
getLineNumber,
getNamespaceForPrefix,
getNamespaceForPrefix,
getNextSibling,
getNextSiblingElem,
getNodeType,
getOwnerDocument,
getParentElem,
getParentNode,
getPrefixes,
getPreviousSibling,
getPublicId,
getStylesheet,
getStylesheetComposed,
getStylesheetRoot,
getSystemId,
getTagName,
getUid,
getXmlSpace,
hasChildNodes,
isCompiledTemplate,
isValidNCName,
item,
recompose,
removeChild,
replaceChild,
resolvePrefixTables,
runtimeInit,
setDOMBackPointer,
setLocaterInfo,
setPrefixes,
setPrefixes,
setUid,
setXmlSpace,
shouldStripWhiteSpace |
Methods inherited from class weblogic.apache.xml.utils.UnImplNode |
appendData,
cloneNode,
createAttribute,
createAttributeNS,
createCDATASection,
createComment,
createDocumentFragment,
createElement,
createElementNS,
createEntityReference,
createProcessingInstruction,
createTextNode,
deleteData,
error,
getAttribute,
getAttributeNode,
getAttributeNodeNS,
getAttributeNS,
getAttributes,
getDoctype,
getDocumentElement,
getElementById,
getElementsByTagName,
getElementsByTagNameNS,
getImplementation,
getLocalName,
getNamespaceURI,
getNodeValue,
getOwnerElement,
getPrefix,
getSpecified,
hasAttribute,
hasAttributeNS,
hasAttributes,
importNode,
insertBefore,
insertData,
isSupported,
normalize,
removeAttribute,
removeAttributeNode,
removeAttributeNS,
removeChild,
replaceData,
setAttribute,
setAttributeNode,
setAttributeNodeNS,
setAttributeNS,
setData,
setNodeValue,
setPrefix,
setValue,
splitText,
substringData |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ElemNumber
public ElemNumber()
setCount
public void setCount(XPath v)
- Set the "count" attribute.
The count attribute is a pattern that specifies what nodes
should be counted at those levels. If count attribute is not
specified, then it defaults to the pattern that matches any
node with the same node type as the current node and, if the
current node has an expanded-name, with the same expanded-name
as the current node.
- Parameters:
v
- Value to set for "count" attribute.
getCount
public XPath getCount()
- Get the "count" attribute.
The count attribute is a pattern that specifies what nodes
should be counted at those levels. If count attribute is not
specified, then it defaults to the pattern that matches any
node with the same node type as the current node and, if the
current node has an expanded-name, with the same expanded-name
as the current node.
- Returns:
- Value of "count" attribute.
setFrom
public void setFrom(XPath v)
- Set the "from" attribute. 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.
- Parameters:
v
- Value to set for "from" attribute.
getFrom
public XPath getFrom()
- Get the "from" attribute.
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.
- Returns:
- Value of "from" attribute.
setLevel
public void setLevel(int v)
- Set the "level" attribute.
The level attribute specifies what levels of the source tree should
be considered; it has the values single, multiple or any. The default
is single.
- Parameters:
v
- Value to set for "level" attribute.
getLevel
public int getLevel()
- Get the "level" attribute.
The level attribute specifies what levels of the source tree should
be considered; it has the values single, multiple or any. The default
is single.
- Returns:
- Value of "level" attribute.
setValue
public void setValue(XPath v)
- Set the "value" attribute.
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.
- Parameters:
v
- Value to set for "value" attribute.
getValue
public XPath getValue()
- Get the "value" attribute.
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.
- Returns:
- Value of "value" attribute.
setFormat
public void setFormat(AVT v)
- Set the "format" attribute.
The "format" attribute is used to control conversion of a list of
numbers into a string.
- Parameters:
v
- Value to set for "format" attribute.- See Also:
- convert in XSLT Specification
getFormat
public AVT getFormat()
- Get the "format" attribute.
The "format" attribute is used to control conversion of a list of
numbers into a string.
- Returns:
- Value of "format" attribute.
- See Also:
- convert in XSLT Specification
setLang
public void setLang(AVT v)
- Set the "lang" attribute.
When numbering with an alphabetic sequence, the lang attribute
specifies which language's alphabet is to be used; it has the same
range of values as xml:lang [XML]; if no lang value is specified,
the language should be determined from the system environment.
Implementers should document for which languages they support numbering.
- Parameters:
v
- Value to set for "lang" attribute.- See Also:
- convert in XSLT Specification
getLang
public AVT getLang()
- Get the "lang" attribute.
When numbering with an alphabetic sequence, the lang attribute
specifies which language's alphabet is to be used; it has the same
range of values as xml:lang [XML]; if no lang value is specified,
the language should be determined from the system environment.
Implementers should document for which languages they support numbering.
- Returns:
- Value ofr "lang" attribute.
- See Also:
- convert in XSLT Specification
setLetterValue
public void setLetterValue(AVT v)
- Set the "letter-value" attribute.
The letter-value attribute disambiguates between numbering sequences
that use letters.
- Parameters:
v
- Value to set for "letter-value" attribute.- See Also:
- convert in XSLT Specification
getLetterValue
public AVT getLetterValue()
- Get the "letter-value" attribute.
The letter-value attribute disambiguates between numbering sequences
that use letters.
- Returns:
- Value to set for "letter-value" attribute.
- See Also:
- convert in XSLT Specification
setGroupingSeparator
public void setGroupingSeparator(AVT v)
- Set the "grouping-separator" attribute.
The grouping-separator attribute gives the separator
used as a grouping (e.g. thousands) separator in decimal
numbering sequences.
- Parameters:
v
- Value to set for "grouping-separator" attribute.- See Also:
- convert in XSLT Specification
getGroupingSeparator
public AVT getGroupingSeparator()
- Get the "grouping-separator" attribute.
The grouping-separator attribute gives the separator
used as a grouping (e.g. thousands) separator in decimal
numbering sequences.
- Returns:
- Value of "grouping-separator" attribute.
- See Also:
- convert in XSLT Specification
setGroupingSize
public void setGroupingSize(AVT v)
- Set the "grouping-size" attribute.
The optional grouping-size specifies the size (normally 3) of the grouping.
- Parameters:
v
- Value to set for "grouping-size" attribute.- See Also:
- convert in XSLT Specification
getGroupingSize
public AVT getGroupingSize()
- Get the "grouping-size" attribute.
The optional grouping-size specifies the size (normally 3) of the grouping.
- Returns:
- Value of "grouping-size" attribute.
- See Also:
- convert in XSLT Specification
getXSLToken
public int getXSLToken()
- Get an int constant identifying the type of element.
- Returns:
- The token ID for this element
- Overrides:
- getXSLToken in class ElemTemplateElement
- See Also:
Constants
getNodeName
public java.lang.String getNodeName()
- Return the node name.
- Returns:
- The element's name
- Overrides:
- getNodeName in class ElemTemplateElement
execute
public void execute(TransformerImpl transformer,
org.w3c.dom.Node sourceNode,
QName mode)
throws javax.xml.transform.TransformerException
- Execute an xsl:number instruction. The xsl:number element is
used to insert a formatted number into the result tree.
- Parameters:
transformer
- non-null reference to the the current transform-time state.sourceNode
- non-null reference to the current source node.mode
- reference, which may be null, to the current mode.- Throws:
- javax.xml.transform.TransformerException -
- Overrides:
- execute in class ElemTemplateElement
appendChild
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
throws org.w3c.dom.DOMException
- Add a child to the child list.
- Parameters:
newChild
- Child to add to child list- Returns:
- Child just added to child list
- Throws:
- org.w3c.dom.DOMException -
- Overrides:
- appendChild in class ElemTemplateElement
getPreviousNode
public org.w3c.dom.Node getPreviousNode(XPathContext xctxt,
org.w3c.dom.Node pos)
throws javax.xml.transform.TransformerException
- Get the previous node to be counted.
- Parameters:
xctxt
- The XPath runtime state for this.pos
- The current node- Returns:
- the previous node to be counted.
- Throws:
- javax.xml.transform.TransformerException -
getTargetNode
public org.w3c.dom.Node getTargetNode(XPathContext xctxt,
org.w3c.dom.Node sourceNode)
throws javax.xml.transform.TransformerException
- Get the target node that will be counted..
- Parameters:
xctxt
- The XPath runtime state for this.sourceNode
- non-null reference to the current source node.- Returns:
- the target node that will be counted
- Throws:
- javax.xml.transform.TransformerException -
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,
FastStringBuffer 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 radixaTable
- Array of alpha characters representing numbersstringBuf
- Buffer where to save the 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,
XResourceBundle 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 radixthisBundle
- Resource bundle to use- 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
WebLogic classes and methods that do not appear in this reference are not public and are not supported.