18 #if !defined(XALAN_ELEMNUMBER_HEADER_GUARD) 19 #define XALAN_ELEMNUMBER_HEADER_GUARD 47 XALAN_CPP_NAMESPACE_BEGIN
100 XalanFileLoc lineNumber,
101 XalanFileLoc columnNumber,
106 MemoryManager& theManager,
110 XalanFileLoc lineNumber,
111 XalanFileLoc columnNumber,
122 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION) 169 const XPath* fromMatchPattern,
170 const XPath* countMatchPattern,
187 const XPath* fromMatchPattern,
188 const XPath* countMatchPattern,
213 CountType numberList[],
231 bool stopAtFirstFound,
253 const CountType theList[],
289 const XalanDOMChar table[],
310 evaluateLetterValueAVT(
315 traditionalAlphaCount(
326 XalanDOMChar numberType,
328 CountType listElement,
331 const XPath* m_countMatchPattern;
332 const XPath* m_fromMatchPattern;
333 const XPath* m_valueExpr;
337 const AVT* m_format_avt;
338 const AVT* m_lang_avt;
339 const AVT* m_lettervalue_avt;
340 const AVT* m_groupingSeparator_avt;
341 const AVT* m_groupingSize_avt;
343 const unsigned long m_id;
348 static const XalanDOMChar s_atString[];
368 static const XalanDOMChar s_piString[];
373 static const XalanDOMChar s_levelString[];
378 static const XalanDOMChar s_multipleString[];
383 static const XalanDOMChar s_anyString[];
388 static const XalanDOMChar s_singleString[];
393 static const XalanDOMChar s_alphabeticString[];
398 static const XalanDOMChar s_traditionalString[];
403 static const XalanDOMChar s_errorString[];
408 static const XalanDOMChar s_alphaCountTable[];
412 static const XalanDOMChar s_elalphaCountTable[];
423 static const size_t s_romanConvertTableSize;
463 m_currentPosition = 0;
483 return m_currentPosition >= m_maxPosition ? false :
true;
496 size_type m_currentPosition;
498 size_type m_maxPosition;
508 XALAN_CPP_NAMESPACE_END
512 #endif // XALAN_ELEMNUMBER_HEADER_GUARD 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 attribut...
const XPath * getCountMatchPattern(StylesheetExecutionContext &executionContext, XalanNode *contextNode) const
Get the count match pattern, or a default value.
Structure to help in converting integrals to roman numerals.
Local implementation of MutableNodeRefList.
virtual const ElemTemplateElement * startElement(StylesheetExecutionContext &executionContext) const
Completes "pre-processing" before any sub-elements are invoked (i.e.
XalanNode * findPrecedingOrAncestorOrSelf(StylesheetExecutionContext &executionContext, const XPath *fromMatchPattern, const XPath *countMatchPattern, XalanNode *context) const
Given a 'from' pattern (ala xsl:number), a match pattern and a context, find the first ancestor that ...
<meta name="usage" content="internal"> This is a table of counters, keyed by ElemNumber objects...
static void terminate()
Perform static shut down.
virtual const XalanDOMString & getElementName() const
Get a string for the name of the element.
XalanNumberFormat * getNumberFormatter(StylesheetExecutionContext &executionContext) const
Get a formatter.
XalanNode * getTargetNode(StylesheetExecutionContext &executionContext, XalanNode *sourceNode) const
Get the target node that will be counted.
XalanVector< CountType > CountTypeArrayType
void getMatchingAncestors(StylesheetExecutionContext &executionContext, XalanNode *node, bool stopAtFirstFound, MutableNodeRefList &ancestors) const
Get the ancestors, up to the root, that match the pattern.
static void int2singlealphaCount(CountType val, const XalanDOMString &table, XalanDOMString &theResult)
Convert an intergral into alphabetic counting, in other words count using the sequence A B C ...
Class to hold an Attribute Value Template.
static void int2alphaCount(CountType val, const XalanDOMChar table[], XalanDOMString::size_type length, XalanDOMString &theResult)
Convert an integral into alphabetic counting, in other words count using the sequence A B C ...
void formatNumberList(StylesheetExecutionContext &executionContext, const CountType theList[], NodeRefListBase::size_type theListLength, XalanDOMString &formattedNumber) const
Format an array of integrals into a formatted string.
virtual void execute(StylesheetExecutionContext &executionContext) const
Execute the element.
ElemNumber(StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, const AttributeListType &atts, XalanFileLoc lineNumber, XalanFileLoc columnNumber, unsigned long id)
Construct an object corresponding to an "xsl:number" element.
XalanNode * getPreviousNode(StylesheetExecutionContext &executionContext, XalanNode *pos) const
Get the previous node to be counted.
static void initialize(MemoryManager &theManager)
Perform static initialization.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType
virtual const XPath * getXPath(XalanSize_t index) const
Get XPath pattern/expression of one of the element atribute.
unsigned long getID() const
This class represents the base stylesheet or an "import" stylesheet.
static ElemNumber * create(MemoryManager &theManager, StylesheetConstructionContext &constructionContext, Stylesheet &stylesheetTree, const AttributeListType &atts, XalanFileLoc lineNumber, XalanFileLoc columnNumber, unsigned long id)
static void toRoman(CountType val, bool prefixesAreOK, XalanDOMString &theResult)
Convert an integral into roman numerals.
CountersTable::CountType CountType
XalanNode * findAncestor(StylesheetExecutionContext &executionContext, const XPath *fromMatchPattern, const XPath *countMatchPattern, XalanNode *context) const
Given a 'from' pattern (ala xsl:number), a match pattern and a context, find the first ancestor that ...
Counter::CountType CountType