Xalan-C++ API Documentation
Xalan-C++ API Documentation
The Xalan C++ XSLT Processor Version 1.4
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
ElemNumber Class Reference
#include <ElemNumber.hpp>
Inheritance diagram for ElemNumber:
Collaboration diagram for ElemNumber:
List of all members.
Public Types
Public Methods
Static Public Methods
Protected Methods
- XalanNode* findAncestor ( StylesheetExecutionContext& executionContext, const XPath* fromMatchPattern, const XPath* countMatchPattern, XalanNode* context, const XalanElement* namespaceContext) const
- Given a 'from' pattern (ala xsl:number), a match pattern and a context, find the first ancestor that matches the pattern (including the context handed in). More...
- XalanNode* findPrecedingOrAncestorOrSelf ( StylesheetExecutionContext& executionContext, const XPath* fromMatchPattern, const XPath* countMatchPattern, XalanNode* context, const XalanElement* namespaceContext) const
- Given a 'from' pattern (ala xsl:number), a match pattern and a context, find the first ancestor that matches the pattern (including the context handed in). More...
- const XPath* getCountMatchPattern ( StylesheetExecutionContext& executionContext, XalanNode* contextNode) const
- Get the count match pattern, or a default value.
- void getCountString ( StylesheetExecutionContext& executionContext, XalanDOMString& theResult) const
- Given an XML source node, get the count according to the parameters set up by the xsl:number attributes.
- void getCountString ( StylesheetExecutionContext& executionContext, XalanNode* sourceNode, const MutableNodeRefList& ancestors, CountersTable& ctable, int numberList[], NodeRefListBase::size_type numberListLength, XalanDOMString& theResult) const
- void getMatchingAncestors ( StylesheetExecutionContext& executionContext, XalanNode* node, bool stopAtFirstFound, MutableNodeRefList& ancestors) const
- Get the ancestors, up to the root, that match the pattern. More...
- XalanNumberFormat* getNumberFormatter ( StylesheetExecutionContext& executionContext, XalanNode* contextNode) const
- Get a formatter. More...
- void formatNumberList ( StylesheetExecutionContext& executionContext, const int theList[], NodeRefListBase::size_type theListLength, XalanNode* contextNode, XalanDOMString& formattedNumber) const
- Format an array of integers into a formatted string. More...
Static Protected Methods
- void int2singlealphaCount ( int val, const XalanDOMString& table, XalanDOMString& theResult)
- Convert a long integer into alphabetic counting, in other words count using the sequence A B C ... More...
- void int2alphaCount ( int val, const XalanDOMChar table[], XalanDOMString::size_type length, XalanDOMString& theResult)
- Convert a long integer into alphabetic counting, in other words count using the sequence A B C ... More...
- void tradAlphaCount ( int val, XalanDOMString& theResult)
- Convert a long integer into traditional alphabetic counting, in other words count using the traditional numbering. More...
- void long2roman ( long val, bool prefixesAreOK, XalanDOMString& theResult)
- Convert a long integer into roman numerals. More...
Detailed Description
Member Typedef Documentation
typedef std::vector<int> ElemNumber::IntArrayType |
|
Member Enumeration Documentation
Constructor & Destructor Documentation
Construct an object corresponding to an "xsl:number" element.
-
Parameters:
-
constructionContext
|
context for construction of object
|
stylesheetTree
|
stylesheet containing element
|
atts
|
list of attributes for element
|
lineNumber
|
line number in document
|
columnNumber
|
column number in document
|
virtual ElemNumber::~ElemNumber () [virtual] |
|
Member Function Documentation
Execute the element's primary function.
Subclasses of this function may
recursively execute down the element tree.
-
Parameters:
-
executionContext
|
The current execution context
|
Reimplemented from ElemTemplateElement.
Given a 'from' pattern (ala xsl:number), a match pattern and a context, find the first ancestor that matches the pattern (including the context handed in).
-
Parameters:
-
matchPatternString
|
The match pattern.
|
node
|
The node that "." expresses.
|
namespaceContext
|
The context in which namespaces in the
queries are supposed to be expanded.
|
Given a 'from' pattern (ala xsl:number), a match pattern and a context, find the first ancestor that matches the pattern (including the context handed in).
-
Parameters:
-
matchPatternString
|
The match pattern.
|
node
|
The node that "." expresses.
|
namespaceContext
|
The context in which namespaces in the
queries are supposed to be expanded.
|
Format an array of integers into a formatted string.
-
Parameters:
-
executionContext
|
The current execution context.
|
theList
|
Array of one or more integer numbers.
|
theListLength
|
The length of the array.
|
contextNode
|
The context node.
|
formattedNumber
|
The formatted number result.
|
Get the count match pattern, or a default value.
Given an XML source node, get the count according to the parameters set up by the xsl:number attributes.
virtual const XalanDOMString& ElemNumber::getElementName () const [virtual] |
|
Get the ancestors, up to the root, that match the pattern.
-
Parameters:
-
patterns
|
if non-0, count only nodes
that match this pattern, if 0 count all ancestors.
|
executionContext
|
The current execution context.
|
node
|
Count this node and it's ancestors.
|
stopAtFirstFound
|
If true, only get the first matching ancestor
|
ancestors
|
The ancestors that match the pattern.
|
Get a formatter.
-
Parameters:
-
executionContext
|
The current execution context.
|
contextNode
|
The current context node.
|
-
Returns:
-
A new XalanNumberFormat instance. The caller owns the memory.
Get the previous node to be counted.
Get the target node that will be counted..
void ElemNumber::initialize () [static] |
|
Perform static initialization.
See class XSLTInit.
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
|
length
|
the table length
|
result
|
returns the stringrepresenting alpha count of number.
|
-
See also:
-
XSLTEngineImpl::DecimalToRoman
Note that the radix of the conversion is inferred from the size
of the 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
|
theResult
|
A string representing alpha count of number.
|
-
See also:
-
XSLTEngineImpl::DecimalToRoman
Note that the radix of the conversion is inferred from the size
of the table.
void ElemNumber::long2roman (
|
long val, |
|
bool prefixesAreOK, |
|
XalanDOMString & theResult) [static, protected] |
|
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").
|
theResult
|
The formatted Roman numeral string.
|
-
See also:
-
DecimalToRoman
, m_romanConvertTable
void ElemNumber::terminate () [static] |
|
Perform static shut down.
See class XSLTInit.
void ElemNumber::tradAlphaCount (
|
int val, |
|
XalanDOMString & theResult) [static, protected] |
|
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:
-
XSLProcessor::DecimalToRoman
Note that the radix of the conversion is inferred from the size
of the table.
The documentation for this class was generated from the following file:
Interpreting class diagrams
Doxygen and
GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.4
Copyright © 2000, 2001, 2002 The Apache Software Foundation. All Rights Reserved.
|
|