Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
ElemNumber Class Reference
Inheritance diagram for ElemNumber:
ElemTemplateElement PrefixResolver

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Protected Member Functions

Static Protected Member Functions


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
eSingle 
eMultiple 
eAny 

Constructor & Destructor Documentation

ElemNumber::ElemNumber ( StylesheetConstructionContext constructionContext,
Stylesheet stylesheetTree,
const AttributeListType atts,
int  lineNumber,
int  columnNumber,
unsigned long  id 
)

Construct an object corresponding to an "xsl:number" element.

Parameters:
constructionContextcontext for construction of object
stylesheetTreestylesheet containing element
attslist of attributes for element
lineNumberline number in document
columnNumbercolumn number in document
idThe unique ID within the stylesheet for this xsl:number element
virtual ElemNumber::~ElemNumber ( ) [virtual]

Member Function Documentation

static ElemNumber* ElemNumber::create ( MemoryManagerType theManager,
StylesheetConstructionContext constructionContext,
Stylesheet stylesheetTree,
const AttributeListType atts,
int  lineNumber,
int  columnNumber,
unsigned long  id 
) [static]
XalanNode* ElemNumber::findAncestor ( StylesheetExecutionContext executionContext,
const XPath fromMatchPattern,
const XPath countMatchPattern,
XalanNode context 
) const [protected]

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:
executionContextThe current execution context
matchPatternStringThe match pattern.
matchPatternStringThe count match pattern.
nodeThe context node
Returns:
A pointer to the matched node.
XalanNode* ElemNumber::findPrecedingOrAncestorOrSelf ( StylesheetExecutionContext executionContext,
const XPath fromMatchPattern,
const XPath countMatchPattern,
XalanNode context 
) const [protected]

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:
executionContextThe current execution context
matchPatternStringThe match pattern.
matchPatternStringThe count match pattern.
nodeThe context node
Returns:
A pointer to the matched node.
void ElemNumber::formatNumberList ( StylesheetExecutionContext executionContext,
const CountType  theList[],
NodeRefListBase::size_type  theListLength,
XalanDOMString formattedNumber 
) const [protected]

Format an array of integrals into a formatted string.

Parameters:
executionContextThe current execution context.
theListArray of one or more integer numbers.
theListLengthThe length of the array.
formattedNumberThe formatted number result.
const XPath* ElemNumber::getCountMatchPattern ( StylesheetExecutionContext executionContext,
XalanNode contextNode 
) const [protected]

Get the count match pattern, or a default value.

void ElemNumber::getCountString ( StylesheetExecutionContext executionContext,
XalanDOMString theResult 
) const [protected]

Given an XML source node, get the count according to the parameters set up by the xsl:number attributes.

void ElemNumber::getCountString ( StylesheetExecutionContext executionContext,
const MutableNodeRefList ancestors,
CountersTable ctable,
CountType  numberList[],
NodeRefListBase::size_type  numberListLength,
XalanDOMString theResult 
) const [protected]
virtual const XalanDOMString& ElemNumber::getElementName ( ) const [virtual]

Get a string for the name of the element.

Useful for debugging purposes, and error reporting.

Returns:
A string containing the name of the element.

Implements ElemTemplateElement.

unsigned long ElemNumber::getID ( ) const
void ElemNumber::getMatchingAncestors ( StylesheetExecutionContext executionContext,
XalanNode node,
bool  stopAtFirstFound,
MutableNodeRefList ancestors 
) const [protected]

Get the ancestors, up to the root, that match the pattern.

Parameters:
patternsif non-0, count only nodes that match this pattern, if 0 count all ancestors.
executionContextThe current execution context.
nodeCount this node and it's ancestors.
stopAtFirstFoundIf true, only get the first matching ancestor
ancestorsThe ancestors that match the pattern.
XalanNumberFormat* ElemNumber::getNumberFormatter ( StylesheetExecutionContext executionContext) const [protected]

Get a formatter.

Parameters:
executionContextThe current execution context.
Returns:
A new XalanNumberFormat instance. The caller owns the memory.
XalanNode* ElemNumber::getPreviousNode ( StylesheetExecutionContext executionContext,
XalanNode pos 
) const

Get the previous node to be counted.

XalanNode* ElemNumber::getTargetNode ( StylesheetExecutionContext executionContext,
XalanNode sourceNode 
) const

Get the target node that will be counted.

virtual const XPath* ElemNumber::getXPath ( unsigned int  index = 0) const [virtual]

Get XPath pattern/expression of one of the element atribute.

number of the attribute. If an attribute has more then one attribute with pattern/expression,the order of the returned expressions are undefined

Returns:
pointer or null

Reimplemented from ElemTemplateElement.

static void ElemNumber::initialize ( MemoryManagerType theManager) [static]

Perform static initialization.

See class XSLTInit.

static void ElemNumber::int2alphaCount ( CountType  val,
const XalanDOMChar  table[],
XalanDOMString::size_type  length,
XalanDOMString theResult 
) [static, protected]

Convert an integral into alphabetic counting, in other words count using the sequence A B C ...

Z AA AB AC.... etc.

Parameters:
valValue to convert -- must be greater than zero.
tablea table containing one character for each digit in the radix
lengththe table length
resultreturns 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.

static void ElemNumber::int2singlealphaCount ( CountType  val,
const XalanDOMString table,
XalanDOMString theResult 
) [static, protected]

Convert an intergral into alphabetic counting, in other words count using the sequence A B C ...

Z.

Parameters:
valValue to convert -- must be greater than zero.
tablea table containing one character for each digit in the radix
theResultA 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.

virtual const ElemTemplateElement* ElemNumber::startElement ( StylesheetExecutionContext executionContext) const [virtual]

Completes "pre-processing" before any sub-elements are invoked (i.e.

children, attribute sets and templates). If there are no sub-elements it executes the primary function of the element.

Parameters:
executionContextcontext to execute this element

Reimplemented from ElemTemplateElement.

static void ElemNumber::terminate ( ) [static]

Perform static shut down.

See class XSLTInit.

static void ElemNumber::toRoman ( CountType  val,
bool  prefixesAreOK,
XalanDOMString theResult 
) [static, protected]

Convert an integral into roman numerals.

Parameters:
valValue to convert.
prefixesAreOKtrue to enable prefix notation (e.g. 4 = "IV"), false to disable prefix notation (e.g. 4 = "IIII").
theResultThe formatted Roman numeral string.
See also:
DecimalToRoman
m_romanConvertTable

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.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo