blob: 78a161d4a08edab86b06c55f314539914ced3b37 [file] [log] [blame]
<HTML><HEAD><TITLE>Xalan-C++ API Documentation</TITLE></HEAD>
<BODY>
<h2 align="center">Xalan-C++ API Documentation</h2>
<h3 align="center">The Xalan C++ XSLT Processor Version 1.10</h3>
</BODY>
<!-- Generated by Doxygen 1.2.8.1 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>StylesheetRoot.hpp</h1><a href="StylesheetRoot_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</font>
00003 <font class="comment"> *</font>
00004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
00005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
00006 <font class="comment"> * You may obtain a copy of the License at</font>
00007 <font class="comment"> *</font>
00008 <font class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</font>
00009 <font class="comment"> *</font>
00010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
00011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
00012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
00013 <font class="comment"> * See the License for the specific language governing permissions and</font>
00014 <font class="comment"> * limitations under the License.</font>
00015 <font class="comment"> */</font>
00016 <font class="preprocessor">#if !defined(XALAN_STYLESHEETROOT_HEADER_GUARD)</font>
<a name="l00017"></a><a class="code" href="StylesheetRoot_8hpp.html#a0">00017</a> <font class="preprocessor"></font><font class="preprocessor">#define XALAN_STYLESHEETROOT_HEADER_GUARD </font>
00018 <font class="preprocessor"></font>
00019
00020
00021 <font class="comment">// Base include file. Must be first.</font>
00022 <font class="preprocessor">#include "<a class="code" href="XSLTDefinitions_8hpp.html">XSLTDefinitions.hpp</a>"</font>
00023
00024
00025
00026 <font class="preprocessor">#include "<a class="code" href="Stylesheet_8hpp.html">Stylesheet.hpp</a>"</font>
00027
00028
00029
00030 <font class="preprocessor">#include &lt;<a class="code" href="XalanMap_8hpp.html">xalanc/Include/XalanMap.hpp</a>&gt;</font>
00031 <font class="preprocessor">#include &lt;<a class="code" href="STLHelper_8hpp.html">xalanc/Include/STLHelper.hpp</a>&gt;</font>
00032
00033
00034
00035 <font class="preprocessor">#include &lt;<a class="code" href="XalanDOMString_8hpp.html">xalanc/XalanDOM/XalanDOMString.hpp</a>&gt;</font>
00036
00037
00038
00039 <font class="preprocessor">#include &lt;<a class="code" href="FormatterListener_8hpp.html">xalanc/PlatformSupport/FormatterListener.hpp</a>&gt;</font>
00040
00041
00042
00043 XALAN_CPP_NAMESPACE_BEGIN
00044
00045
00046
<a name="l00047"></a><a class="code" href="StylesheetRoot_8hpp.html#a1">00047</a> <font class="keyword">class </font><a class="code" href="classElemAttributeSet.html">ElemAttributeSet</a>;
00048 <font class="keyword">class </font><a class="code" href="classStylesheetConstructionContext.html">StylesheetConstructionContext</a>;
00049 <font class="keyword">class </font><a class="code" href="classXalanText.html">XalanText</a>;
00050 <font class="keyword">class </font><a class="code" href="classXSLTResultTarget.html">XSLTResultTarget</a>;
00051
00052
<a name="l00053"></a><a class="code" href="StylesheetRoot_8hpp.html#a2">00053</a> <font class="keyword">typedef</font> XalanVector&lt;ElemAttributeSet*&gt; AttributeSetVectorTypeDecl;
<a name="l00054"></a><a class="code" href="StylesheetRoot_8hpp.html#a3">00054</a> <a class="code" href="XalanMemoryManagement_8hpp.html#a4">XALAN_USES_MEMORY_MANAGER</a>(AttributeSetVectorTypeDecl)
00055
00061 <font class="keyword">class </font>XALAN_XSLT_EXPORT StylesheetRoot : <font class="keyword">public</font> Stylesheet
00062 {
00063 <font class="keyword">public</font>:
00064
00065 <font class="keyword">typedef</font> XalanVector&lt;const XalanQName*&gt; XalanQNameVectorType;
00066
00067 <font class="keyword">typedef</font> AttributeSetVectorTypeDecl AttributeSetVectorType;
00068
00069 <font class="keyword">typedef</font> <a class="code" href="classXalanMap.html">XalanMap</a>&lt;<font class="keyword">const</font> <a class="code" href="classXalanQName.html">XalanQName</a>*,
00070 AttributeSetVectorType&gt; AttributeSetMapType;
00071
00078 <a class="code" href="XalanCompiledStylesheet_8hpp.html#a1">StylesheetRoot</a>(
00079 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; baseIdentifier,
00080 <a class="code" href="classStylesheetConstructionContext.html">StylesheetConstructionContext</a>&amp; constructionContext);
00081
00082 <font class="keyword">virtual</font>
00083 ~StylesheetRoot();
00084
00085 <font class="keyword">static</font> StylesheetRoot*
00086 create(
00087 MemoryManagerType&amp; theManager,
00088 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; baseIdentifier,
00089 <a class="code" href="classStylesheetConstructionContext.html">StylesheetConstructionContext</a>&amp; constructionContext);
00090
00091 MemoryManagerType&amp;
00092 getMemoryManager()<font class="keyword"></font>
00093 <font class="keyword"> </font>{
00094 <font class="keywordflow">return</font> m_version.getMemoryManager();
00095 }
00099 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00100 postConstruction(<a class="code" href="classStylesheetConstructionContext.html">StylesheetConstructionContext</a>&amp; constructionContext);
00101
00109 <font class="keywordtype">void</font>
00110 process(
00111 <a class="code" href="classXalanNode.html">XalanNode</a>* sourceTree,
00112 <a class="code" href="classXSLTResultTarget.html">XSLTResultTarget</a>&amp; outputTarget,
00113 <a class="code" href="classStylesheetExecutionContext.html">StylesheetExecutionContext</a>&amp; executionContext) <font class="keyword">const</font>;
00114
00127 <a class="code" href="classFormatterListener.html">FormatterListener</a>*
00128 setupFormatterListener(
00129 <a class="code" href="classXSLTResultTarget.html">XSLTResultTarget</a>&amp; outputTarget,
00130 <a class="code" href="classStylesheetExecutionContext.html">StylesheetExecutionContext</a>&amp; executionContext) <font class="keyword">const</font>;
00131
00138 FormatterListener::eFormat
00139 getOutputMethod()<font class="keyword"> const</font>
00140 <font class="keyword"> </font>{
00141 <font class="keywordflow">return</font> m_outputMethod;
00142 }
00143
00144 <font class="keywordtype">bool</font>
00145 isOutputMethodSet()<font class="keyword"> const</font>
00146 <font class="keyword"> </font>{
00147 <font class="keywordflow">return</font> getOutputMethod() == FormatterListener::OUTPUT_METHOD_NONE ? <font class="keyword">false</font> : <font class="keyword">true</font>;
00148 }
00149
00156 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp;
00157 getOutputVersion(<a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theResult)<font class="keyword"> const</font>
00158 <font class="keyword"> </font>{
00159 theResult.<a class="code" href="classXalanDOMString.html#a39">assign</a>(m_version);
00160
00161 <font class="keywordflow">return</font> theResult;
00162 }
00163
00170 <font class="keywordtype">bool</font>
00171 getOutputIndent()<font class="keyword"> const</font>
00172 <font class="keyword"> </font>{
00173 <font class="keywordflow">return</font> m_indentResult == eIndentNoImplicit ||
00174 m_indentResult == eIndentNoExplicit ? <font class="keyword">false</font> : <font class="keyword">true</font>;
00175 }
00176
00185 <font class="keywordtype">bool</font>
00186 getHTMLOutputIndent()<font class="keyword"> const</font>
00187 <font class="keyword"> </font>{
00188 <font class="keywordflow">return</font> m_indentResult == eIndentNoExplicit ? <font class="keyword">false</font> : <font class="keyword">true</font>;
00189 }
00190
00197 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp;
00198 getOutputEncoding(<a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theResult)<font class="keyword"> const</font>
00199 <font class="keyword"> </font>{
00200 theResult.<a class="code" href="classXalanDOMString.html#a39">assign</a>(m_encoding);
00201
00202 <font class="keywordflow">return</font> theResult;
00203 }
00204
00211 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp;
00212 getOutputMediaType(<a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theResult)<font class="keyword"> const</font>
00213 <font class="keyword"> </font>{
00214 theResult.<a class="code" href="classXalanDOMString.html#a39">assign</a>(m_mediatype);
00215
00216 <font class="keywordflow">return</font> theResult;
00217 }
00218
00225 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> &amp;
00226 getOutputDoctypeSystem(<a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theResult)<font class="keyword"> const</font>
00227 <font class="keyword"> </font>{
00228 theResult.<a class="code" href="classXalanDOMString.html#a39">assign</a>(m_doctypeSystem);
00229
00230 <font class="keywordflow">return</font> theResult;
00231 }
00232
00239 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp;
00240 getOutputDoctypePublic(<a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theResult)<font class="keyword"> const</font>
00241 <font class="keyword"> </font>{
00242 theResult.<a class="code" href="classXalanDOMString.html#a39">assign</a>(m_doctypePublic);
00243
00244 <font class="keywordflow">return</font> theResult;
00245 }
00246
00252 <font class="keywordtype">bool</font>
00253 getOmitOutputXMLDecl()<font class="keyword"> const</font>
00254 <font class="keyword"> </font>{
00255 <font class="keywordflow">return</font> m_omitxmlDecl;
00256 }
00257
00264 <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp;
00265 getOutputStandalone(<a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theResult)<font class="keyword"> const</font>
00266 <font class="keyword"> </font>{
00267 theResult.<a class="code" href="classXalanDOMString.html#a39">assign</a>(m_standalone);
00268
00269 <font class="keywordflow">return</font> theResult;
00270 }
00271
00277 <a class="code" href="classElemTemplateElement.html">ElemTemplateElement</a>*
00278 getDefaultTextRule()<font class="keyword"> const</font>
00279 <font class="keyword"> </font>{
00280 <font class="keywordflow">return</font> m_defaultTextRule;
00281 }
00282
00288 <a class="code" href="classElemTemplateElement.html">ElemTemplateElement</a>*
00289 getDefaultRule()<font class="keyword"> const</font>
00290 <font class="keyword"> </font>{
00291 <font class="keywordflow">return</font> m_defaultRule;
00292 }
00293
00299 <a class="code" href="classElemTemplateElement.html">ElemTemplateElement</a>*
00300 getDefaultRootRule()<font class="keyword"> const</font>
00301 <font class="keyword"> </font>{
00302 <font class="keywordflow">return</font> m_defaultRootRule;
00303 }
00304
00312 <font class="keywordtype">void</font>
00313 processOutputSpec(
00314 <font class="keyword">const</font> XalanDOMChar* name,
00315 <font class="keyword">const</font> AttributeListType&amp; atts,
00316 <a class="code" href="classStylesheetConstructionContext.html">StylesheetConstructionContext</a>&amp; constructionContext);
00317
00323 URLStackType&amp;
00324 getImportStack()<font class="keyword"></font>
00325 <font class="keyword"> </font>{
00326 <font class="keywordflow">return</font> m_importStack;
00327 }
00328
00334 <font class="keyword">const</font> URLStackType&amp;
00335 getImportStack()<font class="keyword"> const</font>
00336 <font class="keyword"> </font>{
00337 <font class="keywordflow">return</font> m_importStack;
00338 }
00339
00345 <font class="keywordtype">void</font>
00346 setIndentResult(<font class="keywordtype">bool</font> bIndent)<font class="keyword"></font>
00347 <font class="keyword"> </font>{
00348 m_indentResult = bIndent == <font class="keyword">true</font> ? eIndentYesExplicit : eIndentNoExplicit;
00349 }
00350
00357 <font class="keywordtype">void</font>
00358 setOutputMethod(FormatterListener::eFormat meth)<font class="keyword"></font>
00359 <font class="keyword"> </font>{
00360 m_outputMethod = meth;
00361 }
00362
00363 <font class="keywordtype">bool</font>
00364 hasCDATASectionElements()<font class="keyword"> const</font>
00365 <font class="keyword"> </font>{
00366 assert(m_hasCDATASectionElems == <font class="keyword">false</font> &amp;&amp; m_cdataSectionElems.empty() == <font class="keyword">true</font> ||
00367 m_hasCDATASectionElems == <font class="keyword">true</font> &amp;&amp; m_cdataSectionElems.empty() == <font class="keyword">false</font>);
00368
00369 <font class="keywordflow">return</font> m_hasCDATASectionElems;
00370 }
00371
00379 <font class="keywordtype">bool</font>
00380 isCDATASectionElementName(<font class="keyword">const</font> <a class="code" href="classXalanQName.html">XalanQName</a>&amp; theQName) <font class="keyword">const</font>;
00381
00394 <font class="keywordtype">void</font>
00395 getNodeSetByKey(
00396 <a class="code" href="classXalanDocument.html">XalanDocument</a>* doc,
00397 <font class="keyword">const</font> <a class="code" href="classXalanQName.html">XalanQName</a>&amp; qname,
00398 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; ref,
00399 <font class="keyword">const</font> <a class="code" href="classPrefixResolver.html">PrefixResolver</a>&amp; resolver,
00400 <a class="code" href="classMutableNodeRefList.html">MutableNodeRefList</a>&amp; nodelist,
00401 <a class="code" href="classStylesheetExecutionContext.html">StylesheetExecutionContext</a>&amp; executionContext,
00402 KeyTablesTableType&amp; theKeysTable) <font class="keyword">const</font>;
00403
00404 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font>
00405 getNextElemNumberID()<font class="keyword"></font>
00406 <font class="keyword"> </font>{
00407 <font class="keywordflow">return</font> m_elemNumberNextID++;
00408 }
00409
00410 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font>
00411 getElemNumberCount()<font class="keyword"> const</font>
00412 <font class="keyword"> </font>{
00413 <font class="keywordflow">return</font> m_elemNumberNextID;
00414 }
00415
00416 <font class="keywordtype">bool</font>
00417 hasPreserveOrStripSpaceElements()<font class="keyword"> const</font>
00418 <font class="keyword"> </font>{
00419 <font class="keywordflow">return</font> m_whitespaceElements.empty() == <font class="keyword">false</font>;
00420 }
00421
00422 <font class="keywordtype">bool</font>
00423 shouldStripSourceNode(<font class="keyword">const</font> <a class="code" href="classXalanText.html">XalanText</a>&amp; textNode) <font class="keyword">const</font>;
00424
00425 <font class="keywordtype">void</font>
00426 addAttributeSet(<a class="code" href="classElemAttributeSet.html">ElemAttributeSet</a>&amp; theAttributeSet);
00427
00428 <font class="preprocessor">#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)</font>
00429 <font class="preprocessor"></font>
00438 <font class="keyword">const</font> <a class="code" href="classElemAttributeSet.html">ElemAttributeSet</a>*
00439 getAttributeSet(
00440 <a class="code" href="classStylesheetExecutionContext.html">StylesheetExecutionContext</a>&amp; theExecutionContext,
00441 <font class="keyword">const</font> <a class="code" href="classXalanQName.html">XalanQName</a>&amp; theQName,
00442 size_type matchingIndex,
00443 <font class="keyword">const</font> LocatorType* theLocator) <font class="keyword">const</font>;
00444 <font class="preprocessor">#else</font>
00445 <font class="preprocessor"></font> <font class="keywordtype">void</font>
00446 executeAttributeSet(
00447 <a class="code" href="classStylesheetExecutionContext.html">StylesheetExecutionContext</a>&amp; theExecutionContext,
00448 <font class="keyword">const</font> <a class="code" href="classXalanQName.html">XalanQName</a>&amp; theQName,
00449 <font class="keyword">const</font> LocatorType* theLocator) <font class="keyword">const</font>;
00450 <font class="preprocessor">#endif</font>
00451 <font class="preprocessor"></font>
00452
00453 <font class="keyword">private</font>:
00454
00462 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp;
00463 getEncoding(<font class="keyword">const</font> <a class="code" href="classXSLTResultTarget.html">XSLTResultTarget</a>&amp; outputTarget) <font class="keyword">const</font>;
00464
00470 <font class="keywordtype">void</font>
00471 initDefaultRule(<a class="code" href="classStylesheetConstructionContext.html">StylesheetConstructionContext</a>&amp; constructionContext);
00472
00477 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_version;
00478
00479 <font class="keyword">enum</font> eIndentType { eIndentNoImplicit, eIndentNoExplicit, eIndentYesImplicit, eIndentYesExplicit };
00480
00485 eIndentType m_indentResult;
00486
00491 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_encoding;
00492
00497 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_mediatype;
00498
00504 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_doctypeSystem;
00505
00514 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_doctypePublic;
00515
00519 <font class="keywordtype">bool</font> m_omitxmlDecl;
00520
00524 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_standalone;
00525
00530 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_resultNameSpaceURL;
00531
00535 FormatterListener::eFormat m_outputMethod;
00536
00541 XalanQNameVectorType m_cdataSectionElems;
00542
00543 <font class="keywordtype">bool</font> m_hasCDATASectionElems;
00544
00549 URLStackType m_importStack;
00550
00551
00556 <a class="code" href="classElemTemplateElement.html">ElemTemplateElement</a>* m_defaultTextRule;
00557
00562 <a class="code" href="classElemTemplateElement.html">ElemTemplateElement</a>* m_defaultRule;
00563
00568 <a class="code" href="classElemTemplateElement.html">ElemTemplateElement</a>* m_defaultRootRule;
00569
00573 <font class="keywordtype">bool</font> m_needToBuildKeysTable;
00574
00578 <font class="keywordtype">bool</font> m_outputEscapeURLs;
00579
00583 <font class="keywordtype">int</font> m_indentAmount;
00584
00588 <font class="keywordtype">bool</font> m_omitMETATag;
00589
00593 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> m_elemNumberNextID;
00594
00598 AttributeSetMapType m_attributeSetsMap;
00599
00600
00601 <font class="comment">// Not implemented...</font>
00602 <a class="code" href="XalanCompiledStylesheet_8hpp.html#a1">StylesheetRoot</a>(<font class="keyword">const</font> StylesheetRoot&amp;);
00603
00604 StylesheetRoot&amp;
00605 operator=(<font class="keyword">const</font> StylesheetRoot&amp;);
00606
00607 <font class="keywordtype">bool</font>
00608 <a class="code" href="ElemAttributeSet_8hpp.html#a1">operator==</a>(<font class="keyword">const</font> StylesheetRoot&amp;) <font class="keyword">const</font>;
00609 };
00610
00611
00612
00613 XALAN_CPP_NAMESPACE_END
00614
00615
00616
00617 <font class="preprocessor">#endif // XALAN_STYLESHEETROOT_HEADER_GUARD</font>
</font></pre></div><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="../resources/dot.gif" width="1" alt="dot"></TD></TR></TABLE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="80%">
<TR>
<TD WIDTH="80%" VALIGN="TOP">
<P ALIGN="CENTER"><B>Xalan-C++ XSLT Processor Version 1.10</B><BR>
Copyright &copy; 1999-2004 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" ALT="Apache Logo">
</TD>
</TR>
</TABLE>