<HTML><HEAD><TITLE>Xalan-C++ API Documentation</TITLE></HEAD> <BODY> <h2 align="center">Xalan-C++ API Documentation</h2> <h3 align="center">The Xalan C++ XSL Transformer Version 1.1</h3> </BODY> <!-- Generated by Doxygen 1.2.0 on Thu Feb 15 10:43:53 2001 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>ElemNumber.hpp</h1><a href="ElemNumber.hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* </font>00002 <font class="comment"> * The Apache Software License, Version 1.1 </font>00003 <font class="comment"> * </font>00004 <font class="comment"> * </font>00005 <font class="comment"> * Copyright (c) 1999 The Apache Software Foundation. All rights </font>00006 <font class="comment"> * reserved. </font>00007 <font class="comment"> * </font>00008 <font class="comment"> * Redistribution and use in source and binary forms, with or without </font>00009 <font class="comment"> * modification, are permitted provided that the following conditions </font>00010 <font class="comment"> * are met: </font>00011 <font class="comment"> * </font>00012 <font class="comment"> * 1. Redistributions of source code must retain the above copyright </font>00013 <font class="comment"> * notice, this list of conditions and the following disclaimer. </font>00014 <font class="comment"> * </font>00015 <font class="comment"> * 2. Redistributions in binary form must reproduce the above copyright </font>00016 <font class="comment"> * notice, this list of conditions and the following disclaimer in </font>00017 <font class="comment"> * the documentation and/or other materials provided with the </font>00018 <font class="comment"> * distribution. </font>00019 <font class="comment"> * </font>00020 <font class="comment"> * 3. The end-user documentation included with the redistribution, </font>00021 <font class="comment"> * if any, must include the following acknowledgment: </font>00022 <font class="comment"> * "This product includes software developed by the </font>00023 <font class="comment"> * Apache Software Foundation (http://www.apache.org/)." </font>00024 <font class="comment"> * Alternately, this acknowledgment may appear in the software itself, </font>00025 <font class="comment"> * if and wherever such third-party acknowledgments normally appear. </font>00026 <font class="comment"> * </font>00027 <font class="comment"> * 4. The names "Xalan" and "Apache Software Foundation" must </font>00028 <font class="comment"> * not be used to endorse or promote products derived from this </font>00029 <font class="comment"> * software without prior written permission. For written </font>00030 <font class="comment"> * permission, please contact apache@apache.org. </font>00031 <font class="comment"> * </font>00032 <font class="comment"> * 5. Products derived from this software may not be called "Apache", </font>00033 <font class="comment"> * nor may "Apache" appear in their name, without prior written </font>00034 <font class="comment"> * permission of the Apache Software Foundation. </font>00035 <font class="comment"> * </font>00036 <font class="comment"> THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED </font>00037 <font class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES </font>00038 <font class="comment"> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE </font>00039 <font class="comment"> * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR </font>00040 <font class="comment"> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, </font>00041 <font class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT </font>00042 <font class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF </font>00043 <font class="comment"> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND </font>00044 <font class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, </font>00045 <font class="comment"> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT </font>00046 <font class="comment"> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF </font>00047 <font class="comment"> * SUCH DAMAGE. </font>00048 <font class="comment"> * ==================================================================== </font>00049 <font class="comment"> * </font>00050 <font class="comment"> * This software consists of voluntary contributions made by many </font>00051 <font class="comment"> * individuals on behalf of the Apache Software Foundation and was </font>00052 <font class="comment"> * originally based on software copyright (c) 1999, International </font>00053 <font class="comment"> * Business Machines, Inc., http://www.ibm.com. For more </font>00054 <font class="comment"> * information on the Apache Software Foundation, please see </font>00055 <font class="comment"> * <http://www.apache.org/>. </font>00056 <font class="comment"> */</font> 00057 <font class="preprocessor">#if !defined(XALAN_ELEMNUMBER_HEADER_GUARD) </font><a name="l00058"></a><a class="code" href="ElemNumber.hpp.html#a0">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define XALAN_ELEMNUMBER_HEADER_GUARD </font>00059 <font class="preprocessor"></font> 00067 00068 <font class="comment">// Base include file. Must be first.</font> 00069 <font class="preprocessor">#include <<a class="code" href="XSLTDefinitions.hpp.html">XSLT/XSLTDefinitions.hpp</a>></font> 00070 00071 00072 00073 <font class="comment">// Base class header file.</font> 00074 <font class="preprocessor">#include <<a class="code" href="ElemTemplateElement.hpp.html">XSLT/ElemTemplateElement.hpp</a>></font> 00075 00076 00077 00078 <font class="preprocessor">#include "<a class="code" href="MutableNodeRefList.hpp.html">XPath/MutableNodeRefList.hpp</a>"</font> 00079 00080 00081 00082 <font class="preprocessor">#include <<a class="code" href="DecimalToRoman.hpp.html">XSLT/DecimalToRoman.hpp</a>></font> 00083 <font class="preprocessor">#include <<a class="code" href="XalanNumberingResourceBundle.hpp.html">XSLT/XalanNumberingResourceBundle.hpp</a>></font> 00084 00085 00086 00087 <font class="keyword">class </font><a class="code" href="class_avt.html">AVT</a>; 00088 <font class="keyword">class </font><a class="code" href="class_qname.html">QName</a>; 00089 <font class="keyword">class </font><a class="code" href="class_xalannumberformat.html">XalanNumberFormat</a>; 00090 <font class="keyword">class </font><a class="code" href="class_xpath.html">XPath</a>; 00091 <font class="keyword">class </font><a class="code" href="class_xpathexecutioncontext.html">XPathExecutionContext</a>; 00092 00093 00094 <a name="l00095"></a><a class="code" href="class_elemnumber.html">00095</a> <font class="keyword">class </font><a class="code" href="class_elemnumber.html">ElemNumber</a>: <font class="keyword">public</font> <a class="code" href="class_elemtemplateelement.html">ElemTemplateElement</a> 00096 { 00097 <font class="keyword">private</font>: 00098 00099 <font class="keyword">struct </font><a class="code" href="class_counter.html">Counter</a>; 00100 00101 <font class="keyword">public</font>: 00102 00103 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES) </font>00104 <font class="preprocessor"></font> <font class="keyword">typedef</font> vector<<a class="code" href="class_decimaltoroman.html">DecimalToRoman</a>> DecimalToRomanVectorType; 00105 <font class="keyword">typedef</font> vector<<font class="keywordtype">int</font>> IntArrayType; 00106 <font class="keyword">typedef</font> map<XalanDOMChar, 00107 <a class="code" href="class_xalannumberingresourcebundle.html">XalanNumberingResourceBundle</a>, 00108 less<XalanDOMChar> > NumberingResourceBundleMapType; 00109 <font class="preprocessor">#else </font><a name="l00110"></a><a class="code" href="class_elemnumber.html#s0">00110</a> <font class="preprocessor"></font> <font class="keyword">typedef</font> std::vector<<a class="code" href="class_decimaltoroman.html">DecimalToRoman</a>> DecimalToRomanVectorType; <a name="l00111"></a><a class="code" href="class_elemnumber.html#s1">00111</a> <font class="keyword">typedef</font> std::vector<<font class="keywordtype">int</font>> IntArrayType; 00112 <font class="keyword">typedef</font> std::map<XalanDOMChar, <a name="l00113"></a><a class="code" href="class_elemnumber.html#s2">00113</a> <a class="code" href="class_xalannumberingresourcebundle.html">XalanNumberingResourceBundle</a>> NumberingResourceBundleMapType; 00114 <font class="preprocessor">#endif </font>00115 <font class="preprocessor"></font> 00119 <font class="keyword">static</font> <font class="keywordtype">void</font> 00120 <a class="code" href="class_elemnumber.html#d0">initialize</a>(); 00121 00125 <font class="keyword">static</font> <font class="keywordtype">void</font> 00126 <a class="code" href="class_elemnumber.html#d1">terminate</a>(); 00127 00137 <a class="code" href="class_elemnumber.html#a0">ElemNumber</a>( 00138 <a class="code" href="class_stylesheetconstructioncontext.html">StylesheetConstructionContext</a>& constructionContext, 00139 <a class="code" href="class_stylesheet.html">Stylesheet</a>& stylesheetTree, 00140 <font class="keyword">const</font> <a class="code" href="class_attributelist.html">AttributeList</a>& atts, 00141 <font class="keywordtype">int</font> lineNumber, 00142 <font class="keywordtype">int</font> columnNumber); 00143 00144 <font class="keyword">virtual</font> 00145 <a class="code" href="class_elemnumber.html#a1">~ElemNumber</a>(); 00146 00147 <font class="comment">// These methods are inherited from ElemTemplateElement ...</font> 00148 00149 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& 00150 <a class="code" href="class_elemtemplateelement.html#a14">getElementName</a>() <font class="keyword">const</font>; 00151 00152 <font class="keyword">virtual</font> <font class="keywordtype">void</font> 00153 <a class="code" href="class_elemtemplateelement.html#a6">execute</a>( 00154 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00155 <a class="code" href="class_xalannode.html">XalanNode</a>* sourceTree, 00156 <a class="code" href="class_xalannode.html">XalanNode</a>* sourceNode, 00157 <font class="keyword">const</font> <a class="code" href="class_qname.html">QName</a>& mode) <font class="keyword">const</font>; 00158 00162 <a class="code" href="class_xalannode.html">XalanNode</a>* <a class="code" href="class_elemnumber.html#a4">getPreviousNode</a>( 00163 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00164 <a class="code" href="class_xalannode.html">XalanNode</a>* pos) <font class="keyword">const</font>; 00165 00169 <a class="code" href="class_xalannode.html">XalanNode</a>* <a class="code" href="class_elemnumber.html#a5">getTargetNode</a>( 00170 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00171 <a class="code" href="class_xalannode.html">XalanNode</a>* sourceNode) <font class="keyword">const</font>; 00172 00173 <font class="keyword">protected</font>: 00174 00184 <a class="code" href="class_xalannode.html">XalanNode</a>* 00185 <a class="code" href="class_elemnumber.html#b0">findAncestor</a>( 00186 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00187 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* fromMatchPattern, 00188 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* countMatchPattern, 00189 <a class="code" href="class_xalannode.html">XalanNode</a>* context, 00190 <font class="keyword">const</font> <a class="code" href="class_xalanelement.html">XalanElement</a>* namespaceContext) <font class="keyword">const</font>; 00191 00201 <a class="code" href="class_xalannode.html">XalanNode</a>* 00202 <a class="code" href="class_elemnumber.html#b1">findPrecedingOrAncestorOrSelf</a>( 00203 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00204 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* fromMatchPattern, 00205 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* countMatchPattern, 00206 <a class="code" href="class_xalannode.html">XalanNode</a>* context, 00207 <font class="keyword">const</font> <a class="code" href="class_xalanelement.html">XalanElement</a>* namespaceContext) <font class="keyword">const</font>; 00208 00212 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* 00213 <a class="code" href="class_elemnumber.html#b2">getCountMatchPattern</a>( 00214 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00215 <a class="code" href="class_xalannode.html">XalanNode</a>* contextNode) <font class="keyword">const</font>; 00216 00221 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00222 <a class="code" href="class_elemnumber.html#b3">getCountString</a>( 00223 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00224 <a class="code" href="class_xalannode.html">XalanNode</a>* sourceTree, 00225 <a class="code" href="class_xalannode.html">XalanNode</a>* sourceNode) <font class="keyword">const</font>; 00226 00235 <a class="code" href="class_mutablenodereflist.html">MutableNodeRefList</a> <a class="code" href="class_elemnumber.html#b4">getMatchingAncestors</a>( 00236 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00237 <a class="code" href="class_xalannode.html">XalanNode</a>* node, 00238 <font class="keywordtype">bool</font> stopAtFirstFound) <font class="keyword">const</font>; 00239 00246 <a class="code" href="class_xalannumberformat.html">XalanNumberFormat</a>* 00247 <a class="code" href="class_elemnumber.html#b5">getNumberFormatter</a>( 00248 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00249 <a class="code" href="class_xalannode.html">XalanNode</a>* contextNode) <font class="keyword">const</font>; 00250 00261 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00262 <a class="code" href="class_elemnumber.html#b6">formatNumberList</a>( 00263 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00264 <font class="keyword">const</font> IntArrayType& theList, 00265 <a class="code" href="class_xalannode.html">XalanNode</a>* contextNode) <font class="keyword">const</font>; 00266 00278 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> <a class="code" href="class_elemnumber.html#b7">int2singlealphaCount</a>(<font class="keywordtype">int</font> val, 00279 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& table); 00280 00292 <font class="keyword">static</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00293 <a class="code" href="class_elemnumber.html#e0">int2alphaCount</a>( 00294 <font class="keywordtype">int</font> val, 00295 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& table); 00296 00308 <font class="keyword">static</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00309 <a class="code" href="class_elemnumber.html#e1">tradAlphaCount</a>(<font class="keywordtype">int</font> val); 00310 00320 <font class="keyword">static</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00321 <a class="code" href="class_elemnumber.html#e2">long2roman</a>( 00322 <font class="keywordtype">long</font> val, 00323 <font class="keywordtype">bool</font> prefixesAreOK); 00324 00325 <font class="keyword">private</font>: 00326 00327 <font class="keywordtype">bool</font> 00328 evaluateLetterValueAVT( 00329 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00330 <a class="code" href="class_xalannode.html">XalanNode</a>* contextNode, 00331 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& compareValue) <font class="keyword">const</font>; 00332 00333 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00334 traditionalAlphaCount( 00335 <font class="keywordtype">int</font> theValue, 00336 <font class="keyword">const</font> <a class="code" href="class_xalannumberingresourcebundle.html">XalanNumberingResourceBundle</a>& theResourceBundle) <font class="keyword">const</font>; 00337 00338 <font class="comment">/* </font>00339 <font class="comment"> * Get Formatted number </font>00340 <font class="comment"> */</font> 00341 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00342 getFormattedNumber( 00343 <a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& executionContext, 00344 <a class="code" href="class_xalannode.html">XalanNode</a>* contextNode, 00345 XalanDOMChar numberType, 00346 <font class="keywordtype">int</font> numberWidth, 00347 <font class="keywordtype">int</font> listElement) <font class="keyword">const</font>; 00348 00349 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* m_countMatchPattern; 00350 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* m_fromMatchPattern; 00351 <font class="keyword">const</font> <a class="code" href="class_xpath.html">XPath</a>* m_valueExpr; 00352 00353 <font class="keywordtype">int</font> m_level; <font class="comment">// = Constants.NUMBERLEVEL_SINGLE;</font> 00354 00355 <font class="keyword">const</font> <a class="code" href="class_avt.html">AVT</a>* m_format_avt; 00356 <font class="keyword">const</font> <a class="code" href="class_avt.html">AVT</a>* m_lang_avt; 00357 <font class="keyword">const</font> <a class="code" href="class_avt.html">AVT</a>* m_lettervalue_avt; 00358 <font class="keyword">const</font> <a class="code" href="class_avt.html">AVT</a>* m_groupingSeparator_avt; 00359 <font class="keyword">const</font> <a class="code" href="class_avt.html">AVT</a>* m_groupingSize_avt; 00360 00364 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_atString; 00365 00369 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_textString; 00370 00374 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_commentString; 00375 00379 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_slashString; 00380 00384 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_piString; 00385 00389 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_leftParenString; 00390 00394 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_dotString; 00395 00399 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_oneString; 00400 00405 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_alphaCountTable; 00406 00407 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_elalphaCountTable; 00408 00414 <font class="keyword">static</font> <font class="keyword">const</font> DecimalToRomanVectorType& s_romanConvertTable; 00415 00419 <font class="keyword">static</font> <font class="keyword">const</font> NumberingResourceBundleMapType& s_resourceBundles; 00420 00421 00426 <font class="keyword">class </font>NumberFormatStringTokenizer 00427 { 00428 <font class="keyword">public</font>: 00429 00435 <font class="keyword">explicit</font> 00436 NumberFormatStringTokenizer(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theStr = XalanDOMString()); 00437 00443 <font class="keywordtype">void</font> 00444 setString(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theString); 00445 00449 <font class="keywordtype">void</font> 00450 reset()<font class="keyword"> </font>00451 <font class="keyword"> </font>{ 00452 m_currentPosition = 0; 00453 } 00454 00461 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> 00462 nextToken(); 00463 00469 <font class="keywordtype">bool</font> 00470 hasMoreTokens()<font class="keyword"> const </font>00471 <font class="keyword"> </font>{ 00472 <font class="keywordflow">return</font> (m_currentPosition >= m_maxPosition) ? <font class="keyword">false</font> : <font class="keyword">true</font>; 00473 } 00474 00480 <font class="keywordtype">int</font> 00481 countTokens() <font class="keyword">const</font>; 00482 00483 <font class="keyword">private</font>: 00484 00485 <font class="keywordtype">int</font> m_currentPosition; 00486 <font class="keywordtype">int</font> m_maxPosition; 00487 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> m_str; 00488 }; <font class="comment">// end NumberFormatStringTokenizer</font> 00489 00490 }; <font class="comment">// end ElemNumber</font> 00491 00492 <font class="preprocessor">#endif // XALAN_ELEMNUMBER_HEADER_GUARD </font></div></pre><p align="center"><a href="diagramnotes.html">Interpreting class diagrams</a></p> <p><FONT color="#000000" face="arial,helvetica,sanserif" size="-1"> <i><A href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</A> and <A href="http://www.research.att.com/sw/tools/graphviz/">GraphViz</A> are used to generate this API documentation from the Xalan-C header files.</I></FONT></p> <TABLE border="0" cellpadding="0" cellspacing="0" width="820"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1"></TD></TR></TABLE> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="80%"> <TR> <TD WIDTH="80%" VALIGN="TOP"> <P ALIGN="CENTER"><B>Xalan-C++ XSL Transformer Version 1.1</B><BR> Copyright © 2000, 2001 The Apache Software Foundation. All Rights Reserved.</i></p> </TD> </TR> <TR> <TD WIDTH="100%"> <P ALIGN="CENTER"><IMG SRC="ApacheLogo.jpg" WIDTH="387" HEIGHT="100" ALIGN="BOTTOM" BORDER="0"> </TD> </TR> </TABLE>