<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:59 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>NamespacesHandler.hpp</h1><a href="NamespacesHandler.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) 2000 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="comment"> * $ Id: $ </font>00058 <font class="comment"> * </font>00059 <font class="comment"> */</font> 00060 00061 <font class="preprocessor">#if !defined(XALAN_NAMESPACESHANDLER_HEADER_GUARD) </font><a name="l00062"></a><a class="code" href="NamespacesHandler.hpp.html#a0">00062</a> <font class="preprocessor"></font><font class="preprocessor">#define XALAN_NAMESPACESHANDLER_HEADER_GUARD </font>00063 <font class="preprocessor"></font> 00064 00065 00066 <font class="comment">// Base include file. Must be first.</font> 00067 <font class="preprocessor">#include <<a class="code" href="XSLTDefinitions.hpp.html">XSLT/XSLTDefinitions.hpp</a>></font> 00068 00069 00070 00071 <font class="preprocessor">#include <map></font> 00072 <font class="preprocessor">#include <set></font> 00073 <font class="preprocessor">#include <vector></font> 00074 00075 00076 00077 <font class="preprocessor">#include <<a class="code" href="XalanDOMString.hpp.html">XalanDOM/XalanDOMString.hpp</a>></font> 00078 00079 00080 00081 <font class="preprocessor">#include <<a class="code" href="NameSpace.hpp.html">XPath/NameSpace.hpp</a>></font> 00082 <font class="preprocessor">#include <<a class="code" href="QName.hpp.html">XPath/QName.hpp</a>></font> 00083 00084 00085 00086 <font class="keyword">class </font><a class="code" href="class_stylesheetconstructioncontext.html">StylesheetConstructionContext</a>; 00087 <font class="keyword">class </font><a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>; 00088 00089 00090 <a name="l00091"></a><a class="code" href="class_namespaceshandler.html">00091</a> <font class="keyword">class </font>XALAN_XSLT_EXPORT <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a> 00092 { 00093 <font class="keyword">public</font>: 00094 00098 <font class="keyword">static</font> <font class="keywordtype">void</font> 00099 <a class="code" href="class_namespaceshandler.html#d0">initialize</a>(); 00100 00104 <font class="keyword">static</font> <font class="keywordtype">void</font> 00105 <a class="code" href="class_namespaceshandler.html#d1">terminate</a>(); 00106 00107 00108 <font class="comment">/* Some static strings for various namespace URIs... </font>00109 <font class="comment"> * </font>00110 <font class="comment"> */</font> <a name="l00111"></a><a class="code" href="class_namespaceshandler.html#p0">00111</a> <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_ApacheXSLTNamespaceURI; 00112 <a name="l00113"></a><a class="code" href="class_namespaceshandler.html#p1">00113</a> <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_LotusXSLTNamespaceURI; 00114 <a name="l00115"></a><a class="code" href="class_namespaceshandler.html#p2">00115</a> <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& s_LotusXSLTNamespaceURIWithSeparator; 00116 00117 <a name="l00118"></a><a class="code" href="class_namespaceshandler__namespaceextended.html">00118</a> <font class="keyword">class </font>NameSpaceExtended : <font class="keyword">public</font> <a class="code" href="class_namespace.html">NameSpace</a> 00119 { 00120 <font class="keyword">public</font>: 00121 <a name="l00122"></a><a class="code" href="class_namespaceshandler__namespaceextended.html#a0">00122</a> NameSpaceExtended( 00123 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& prefix = XalanDOMString(), 00124 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& uri = XalanDOMString()) : 00125 <a class="code" href="class_namespace.html#a0">NameSpace</a>(prefix, uri), 00126 m_resultAttributeName()<font class="keyword"> </font>00127 <font class="keyword"> </font>{ 00128 } 00129 <a name="l00130"></a><a class="code" href="class_namespaceshandler__namespaceextended.html#a1">00130</a> NameSpaceExtended(<font class="keyword">const</font> <a class="code" href="class_namespace.html">NameSpace</a>& theNamespace) : 00131 <a class="code" href="class_namespace.html">NameSpace</a>(theNamespace), 00132 m_resultAttributeName() 00133 { 00134 } 00135 00141 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& <a name="l00142"></a><a class="code" href="class_namespaceshandler__namespaceextended.html#a2">00142</a> getResultAttributeName()<font class="keyword"> const </font>00143 <font class="keyword"> </font>{ 00144 <font class="keywordflow">return</font> m_resultAttributeName; 00145 } 00146 00152 <font class="keywordtype">void</font> <a name="l00153"></a><a class="code" href="class_namespaceshandler__namespaceextended.html#a3">00153</a> setResultAttributeName(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& name)<font class="keyword"> </font>00154 <font class="keyword"> </font>{ 00155 m_resultAttributeName = name; 00156 } 00157 00158 <font class="keyword">private</font>: 00159 00160 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> m_resultAttributeName; 00161 }; 00162 <a name="l00163"></a><a class="code" href="class_namespaceshandler.html#s0">00163</a> <font class="keyword">typedef</font> QName::NamespaceVectorType NamespaceVectorType; <a name="l00164"></a><a class="code" href="class_namespaceshandler.html#s1">00164</a> <font class="keyword">typedef</font> QName::NamespacesStackType NamespacesStackType; 00165 00166 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES) </font>00167 <font class="preprocessor"></font> <font class="keyword">typedef</font> map<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, 00168 <a class="code" href="class_xalandomstring.html">XalanDOMString</a>, 00169 less<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>> > ExcludedResultPrefixesMapType; 00170 00171 <font class="keyword">typedef</font> map<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, 00172 NameSpaceExtended, 00173 less<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>> > NamespacesMapType; 00174 00175 <font class="keyword">typedef</font> map<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, 00176 <a class="code" href="class_xalandomstring.html">XalanDOMString</a>, 00177 less<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>> > NamespaceAliasesMapType; 00178 00179 <font class="keyword">typedef</font> set<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, 00180 less<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>> > ExtensionNamespaceURISetType; 00181 <font class="preprocessor">#else </font><a name="l00182"></a><a class="code" href="class_namespaceshandler.html#s2">00182</a> <font class="preprocessor"></font> <font class="keyword">typedef</font> std::map<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, <a class="code" href="class_xalandomstring.html">XalanDOMString</a>> ExcludedResultPrefixesMapType; 00183 00184 <font class="keyword">typedef</font> std::map<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, <a name="l00185"></a><a class="code" href="class_namespaceshandler.html#s3">00185</a> NameSpaceExtended> NamespacesMapType; 00186 <a name="l00187"></a><a class="code" href="class_namespaceshandler.html#s4">00187</a> <font class="keyword">typedef</font> std::map<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>, <a class="code" href="class_xalandomstring.html">XalanDOMString</a>> NamespaceAliasesMapType; 00188 <a name="l00189"></a><a class="code" href="class_namespaceshandler.html#s5">00189</a> <font class="keyword">typedef</font> std::set<<a class="code" href="class_xalandomstring.html">XalanDOMString</a>> ExtensionNamespaceURISetType; 00190 <font class="preprocessor">#endif </font>00191 <font class="preprocessor"></font> 00195 <font class="keyword">explicit</font> 00196 NamespacesHandler(); 00197 00206 NamespacesHandler( 00207 <font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& stylesheetNamespacesHandler, 00208 <font class="keyword">const</font> NamespacesStackType& theCurrentNamespaces, 00209 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theXSLTNamespaceURI); 00210 00211 NamespacesHandler(<font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& theSource); 00212 00213 ~NamespacesHandler(); 00214 00222 <font class="keywordtype">void</font> 00223 processExcludeResultPrefixes( 00224 <font class="keyword">const</font> XalanDOMChar* theValue, 00225 <font class="keyword">const</font> NamespacesStackType& theCurrentNamespaces, 00226 <a class="code" href="class_stylesheetconstructioncontext.html">StylesheetConstructionContext</a>& theConstructionContext); 00227 00235 <font class="keywordtype">void</font> 00236 processExtensionElementPrefixes( 00237 <font class="keyword">const</font> XalanDOMChar* theValue, 00238 <font class="keyword">const</font> NamespacesStackType& theCurrentNamespaces, 00239 <a class="code" href="class_stylesheetconstructioncontext.html">StylesheetConstructionContext</a>& theConstructionContext); 00240 00247 <font class="keywordtype">void</font> 00248 postConstruction( 00249 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theElementName = XalanDOMString(), 00250 <font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>* parentNamespacesHandler = 0); 00251 00252 <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& 00253 operator=(<font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& theRHS); 00254 00263 <font class="keywordtype">bool</font> 00264 shouldExcludeResultNamespaceNode( 00265 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theXSLTNamespaceURI, 00266 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& thePrefix, 00267 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theURI) <font class="keyword">const</font>; 00268 00276 <font class="keywordtype">bool</font> <a name="l00277"></a><a class="code" href="class_namespaceshandler.html#a9">00277</a> hasExcludedPrefix(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& thePrefix)<font class="keyword"> const </font>00278 <font class="keyword"> </font>{ 00279 <font class="keywordflow">return</font> m_excludedResultPrefixes.count(thePrefix) != 0 ? <font class="keyword">true</font> : <font class="keyword">false</font>; 00280 } 00281 00287 <font class="keywordtype">void</font> <a name="l00288"></a><a class="code" href="class_namespaceshandler.html#a10">00288</a> addExtensionNamespaceURI(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theURI)<font class="keyword"> </font>00289 <font class="keyword"> </font>{ 00290 m_extensionNamespaceURIs.insert(theURI); 00291 } 00292 00299 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& 00300 getNamespace(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& thePrefix) <font class="keyword">const</font>; 00301 00308 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& 00309 getNamespaceAlias(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theStylesheetNamespace) <font class="keyword">const</font>; 00310 00317 <font class="keywordtype">void</font> <a name="l00318"></a><a class="code" href="class_namespaceshandler.html#a13">00318</a> setNamespaceAlias( 00319 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theStylesheetNamespace, 00320 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theResultNamespace)<font class="keyword"> </font>00321 <font class="keyword"> </font>{ 00322 m_namespaceAliases[theStylesheetNamespace] = theResultNamespace; 00323 } 00324 00330 <font class="keywordtype">void</font> 00331 copyNamespaceAliases(<font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& parentNamespacesHandler); 00332 00338 <font class="keywordtype">void</font> 00339 outputResultNamespaces(<a class="code" href="class_stylesheetexecutioncontext.html">StylesheetExecutionContext</a>& theExecutionContext) <font class="keyword">const</font>; 00340 00344 <font class="keywordtype">void</font> 00345 clear(); 00346 00352 <font class="keywordtype">void</font> 00353 swap(<a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& theOther); 00354 00355 <font class="keywordtype">bool</font> <a name="l00356"></a><a class="code" href="class_namespaceshandler.html#a18">00356</a> getProcessNamespaceAliaises()<font class="keyword"> const </font>00357 <font class="keyword"> </font>{ 00358 <font class="keywordflow">return</font> m_processAliases; 00359 } 00360 00361 <font class="keywordtype">void</font> <a name="l00362"></a><a class="code" href="class_namespaceshandler.html#a19">00362</a> setProcessNamespaceAliaises(<font class="keywordtype">bool</font> fValue)<font class="keyword"> </font>00363 <font class="keyword"> </font>{ 00364 m_processAliases = fValue; 00365 } 00366 00367 <font class="keyword">private</font>: 00368 00372 <font class="keywordtype">void</font> 00373 createResultAttributeNames(); 00374 00380 <font class="keywordtype">void</font> 00381 processExcludeResultPrefixes(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theElementPrefix); 00382 00386 <font class="keywordtype">void</font> 00387 processNamespaceAliases(); 00388 00394 <font class="keywordtype">void</font> 00395 copyNamespaceAliases(<font class="keyword">const</font> NamespaceAliasesMapType& theNamespaceAliases); 00396 00402 <font class="keywordtype">void</font> 00403 copyExtensionNamespaceURIs(<font class="keyword">const</font> ExtensionNamespaceURISetType& theExtensionNamespaceURIs); 00404 00410 <font class="keywordtype">void</font> 00411 copyExcludeResultPrefixes(<font class="keyword">const</font> ExcludedResultPrefixesMapType& theExcludeResultPrefixes); 00412 00422 <font class="keywordtype">bool</font> 00423 shouldExcludeResultNamespaceNode( 00424 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& theXSLTNamespaceURI, 00425 <font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>& parentNamespacesHandler, 00426 <font class="keyword">const</font> <a class="code" href="class_namespace.html">NameSpace</a>& theNamespace) <font class="keyword">const</font>; 00427 00428 <font class="comment">// Not implemented...</font> 00429 <font class="keywordtype">bool</font> 00430 <a class="code" href="class_namespace.html#a7">operator==</a>(<font class="keyword">const</font> <a class="code" href="class_namespaceshandler.html">NamespacesHandler</a>&) <font class="keyword">const</font>; 00431 00432 <font class="comment">// Data members...</font> 00433 ExcludedResultPrefixesMapType m_excludedResultPrefixes; 00434 00435 NamespacesMapType m_namespaceDeclarations; 00436 00437 ExtensionNamespaceURISetType m_extensionNamespaceURIs; 00438 00439 NamespaceAliasesMapType m_namespaceAliases; 00440 00441 <font class="comment">// If true namespace aliases will be processed. If false, they will not.</font> 00442 <font class="keywordtype">bool</font> m_processAliases; 00443 00444 <font class="keyword">const</font> <font class="keyword">static</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a> s_dummyEmptyString; 00445 }; 00446 00447 00448 00449 <font class="preprocessor">#endif // XALAN_NAMESPACESHANDLER_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>