blob: a37e1459e74983b11079a0ebcbc194579670148b [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>FormatterToHTML.hpp</h1><a href="FormatterToHTML_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(FORMATTERTOHTML_HEADER_GUARD_1357924680)</font>
<a name="l00017"></a><a class="code" href="FormatterToHTML_8hpp.html#a0">00017</a> <font class="preprocessor"></font><font class="preprocessor">#define FORMATTERTOHTML_HEADER_GUARD_1357924680</font>
00018 <font class="preprocessor"></font>
00019
00020
00021 <font class="comment">// Base include file. Must be first.</font>
00022 <font class="preprocessor">#include &lt;<a class="code" href="XMLSupportDefinitions_8hpp.html">xalanc/XMLSupport/XMLSupportDefinitions.hpp</a>&gt;</font>
00023
00024
00025
00026 <font class="preprocessor">#include &lt;<a class="code" href="XalanVector_8hpp.html">xalanc/Include/XalanVector.hpp</a>&gt;</font>
00027
00028
00029
00030 <font class="comment">// Base class header file.</font>
00031 <font class="preprocessor">#include &lt;<a class="code" href="FormatterToXML_8hpp.html">xalanc/XMLSupport/FormatterToXML.hpp</a>&gt;</font>
00032
00033
00034
00035 <font class="preprocessor">#include &lt;<a class="code" href="DOMStringHelper_8hpp.html">xalanc/PlatformSupport/DOMStringHelper.hpp</a>&gt;</font>
00036
00037
00038
00039 <font class="preprocessor">#include &lt;<a class="code" href="XalanHTMLElementsProperties_8hpp.html">xalanc/XMLSupport/XalanHTMLElementsProperties.hpp</a>&gt;</font>
00040
00041
00042
00043 XALAN_CPP_NAMESPACE_BEGIN
00044
00045
00046
<a name="l00050"></a><a class="code" href="classFormatterToHTML.html">00050</a> <font class="keyword">class </font>XALAN_XMLSUPPORT_EXPORT <a class="code" href="classFormatterToHTML.html">FormatterToHTML</a> : <font class="keyword">public</font> <a class="code" href="classFormatterToXML.html">FormatterToXML</a>
00051 {
00052
00053 <font class="keyword">public</font>:
00054
00055
<a name="l00056"></a><a class="code" href="classFormatterToHTML.html#s0">00056</a> <font class="keyword">typedef</font> XalanVector&lt;XalanHTMLElementsProperties::ElementProperties&gt; ElementPropertiesStackType;
00057
00058
00059 <font class="keyword">enum</font>
00060 {
00061 eDefaultIndentAmount = 0
00062 };
00063
00075 <a class="code" href="classFormatterToHTML.html#a0">FormatterToHTML</a>(
00076 <a class="code" href="classWriter.html">Writer</a>&amp; writer,
00077 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; encoding = <a class="code" href="AVTPart_8hpp.html#a1">XalanDOMString</a>(XalanMemMgrs::getDummyMemMgr()),
00078 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; mediaType = <a class="code" href="AVTPart_8hpp.html#a1">XalanDOMString</a>(XalanMemMgrs::getDummyMemMgr()),
00079 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; doctypeSystem = <a class="code" href="AVTPart_8hpp.html#a1">XalanDOMString</a>(XalanMemMgrs::getDummyMemMgr()),
00080 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; doctypePublic = <a class="code" href="AVTPart_8hpp.html#a1">XalanDOMString</a>(XalanMemMgrs::getDummyMemMgr()),
00081 <font class="keywordtype">bool</font> doIndent = <font class="keyword">true</font>,
00082 <font class="keywordtype">int</font> indent = eDefaultIndentAmount,
00083 <font class="keywordtype">bool</font> escapeURLs = <font class="keyword">true</font>,
00084 <font class="keywordtype">bool</font> omitMetaTag = <font class="keyword">false</font>,
00085 MemoryManagerType&amp; theManager XALAN_DEFAULT_MEMMGR);
00086
00087 <font class="keyword">static</font> <a class="code" href="classFormatterToHTML.html">FormatterToHTML</a>*
00088 <a class="code" href="classFormatterToXML.html#d0">create</a>(
00089 MemoryManagerType&amp; theManager,
00090 <a class="code" href="classWriter.html">Writer</a>&amp; writer,
00091 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; encoding,
00092 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; mediaType,
00093 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; doctypeSystem,
00094 <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; doctypePublic,
00095 <font class="keywordtype">bool</font> doIndent,
00096 <font class="keywordtype">int</font> indent,
00097 <font class="keywordtype">bool</font> escapeURLs,
00098 <font class="keywordtype">bool</font> omitMetaTag);
00099 <font class="keyword">virtual</font>
00100 <a class="code" href="classFormatterToHTML.html#a1">~FormatterToHTML</a>();
00101
00102 <font class="comment">// These methods are inherited from DocumentHandler ...</font>
00103
00104 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00105 <a class="code" href="classFormatterToXML.html#a4">startDocument</a>();
00106
00107 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00108 <a class="code" href="classFormatterToXML.html#a5">endDocument</a>();
00109
00110 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00111 <a class="code" href="classFormatterToXML.html#a6">startElement</a>(
00112 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name,
00113 AttributeListType&amp; attrs);
00114
00115 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00116 <a class="code" href="classFormatterToXML.html#a7">endElement</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name);
00117
00118 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00119 <a class="code" href="classFormatterToXML.html#a8">characters</a>(
00120 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> chars,
00121 <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> length);
00122
00123 <font class="comment">// These methods are inherited from FormatterToXML...</font>
00124
00125 <font class="keyword">virtual</font> <font class="keywordtype">bool</font>
00126 <a class="code" href="classFormatterToXML.html#b10">accumDefaultEntity</a>(
00127 XalanDOMChar ch,
00128 <font class="keywordtype">bool</font> escLF);
00129
00130 <font class="comment">// These methods are inherited from FormatterListener ...</font>
00131
00132 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00133 <a class="code" href="classFormatterToXML.html#a10">entityReference</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name);
00134
00135 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00136 <a class="code" href="classFormatterToXML.html#a15">cdata</a>(
00137 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> ch,
00138 <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> length);
00139
00140 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00141 <a class="code" href="classFormatterToXML.html#a12">processingInstruction</a>(
00142 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> target,
00143 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> data);
00144
00145
00146 <font class="keywordtype">bool</font>
<a name="l00147"></a><a class="code" href="classFormatterToHTML.html#a11">00147</a> <a class="code" href="classFormatterToHTML.html#a11">getEscapeURLs</a>()<font class="keyword"> const</font>
00148 <font class="keyword"> </font>{
00149 <font class="keywordflow">return</font> m_escapeURLs;
00150 }
00151
00152 <font class="keywordtype">void</font>
<a name="l00153"></a><a class="code" href="classFormatterToHTML.html#a12">00153</a> <a class="code" href="classFormatterToHTML.html#a12">setEscapeURLs</a>(<font class="keywordtype">bool</font> flag)<font class="keyword"></font>
00154 <font class="keyword"> </font>{
00155 m_escapeURLs = flag;
00156 }
00157
<a name="l00158"></a><a class="code" href="structFormatterToHTML_1_1Entity.html">00158</a> <font class="keyword">struct </font>Entity
00159 {
00160 <font class="keyword">enum</font> { eMaxLength = 8 };
00161
<a name="l00162"></a><a class="code" href="structFormatterToHTML_1_1Entity.html#m0">00162</a> XalanDOMChar m_char;
00163
<a name="l00164"></a><a class="code" href="structFormatterToHTML_1_1Entity.html#m1">00164</a> XalanDOMString::size_type m_length;
00165
<a name="l00166"></a><a class="code" href="structFormatterToHTML_1_1Entity.html#m2">00166</a> XalanDOMChar m_string[eMaxLength + 1];
00167 };
00168
00169 <font class="keyword">protected</font>:
00170
00171 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00172 <a class="code" href="classFormatterToXML.html#b23">writeAttrString</a>(
00173 <font class="keyword">const</font> XalanDOMChar* theString,
00174 XalanDOMString::size_type theStringLength);
00175
00176 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00177 <a class="code" href="classFormatterToXML.html#b24">accumCommentData</a>(<font class="keyword">const</font> XalanDOMChar* data);
00178
00179 <font class="keywordtype">void</font>
00180 <a class="code" href="classFormatterToHTML.html#b2">writeCharacters</a>(<font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; theString);
00181
00182 <font class="keywordtype">void</font>
00183 <a class="code" href="classFormatterToHTML.html#b2">writeCharacters</a>(
00184 <font class="keyword">const</font> XalanDOMChar* theString,
00185 XalanDOMString::size_type theLength);
00186
00187 <font class="keyword">private</font>:
00188
00189 <font class="keyword">typedef</font> XalanDOMString::size_type size_type;
00190
00194 <font class="keyword">static</font> <font class="keyword">const</font> XalanDOMChar s_doctypeHeaderStartString[];
00195
00196 <font class="keyword">static</font> <font class="keyword">const</font> size_type s_doctypeHeaderStartStringLength;
00197
00201 <font class="keyword">static</font> <font class="keyword">const</font> XalanDOMChar s_doctypeHeaderPublicString[];
00202
00203 <font class="keyword">static</font> <font class="keyword">const</font> size_type s_doctypeHeaderPublicStringLength;
00204
00208 <font class="keyword">static</font> <font class="keyword">const</font> XalanDOMChar s_doctypeHeaderSystemString[];
00209
00210 <font class="keyword">static</font> <font class="keyword">const</font> size_type s_doctypeHeaderSystemStringLength;
00211
00215 <font class="keyword">static</font> <font class="keyword">const</font> XalanDOMChar s_metaString[];
00216
00217 <font class="keyword">static</font> <font class="keyword">const</font> size_type s_metaStringLength;
00218
00222 <font class="keywordtype">void</font>
00223 <a class="code" href="classFormatterToXML.html#b11">initAttrCharsMap</a>();
00224
00228 <font class="keywordtype">void</font>
00229 <a class="code" href="classFormatterToXML.html#b12">initCharsMap</a>();
00230
00231 <font class="keywordtype">void</font>
00232 copyEntityIntoBuffer(
00233 <font class="keyword">const</font> XalanDOMChar* s,
00234 XalanDOMString::size_type theLength);
00235
00236 <font class="keywordtype">void</font>
00237 copyEntityIntoBuffer(<font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a>&amp; s);
00238
00244 <font class="keyword">virtual</font> <font class="keywordtype">void</font>
00245 processAttribute(
00246 <font class="keyword">const</font> XalanDOMChar* name,
00247 <font class="keyword">const</font> XalanDOMChar* value,
00248 <font class="keyword">const</font> <a class="code" href="classXalanHTMLElementsProperties_1_1ElementProperties.html">XalanHTMLElementsProperties::ElementProperties</a>&amp; elemProperties);
00249
00257 <font class="keywordtype">void</font>
00258 writeAttrURI(
00259 <font class="keyword">const</font> XalanDOMChar* theString,
00260 XalanDOMString::size_type theStringLength);
00261
00269 <font class="keywordtype">void</font>
00270 accumHexNumber(XalanDOMChar theChar);
00271
00272 <font class="keywordtype">bool</font>
00273 popHasNamespace();
00274
00275 <font class="keywordtype">bool</font>
00276 pushHasNamespace(<font class="keyword">const</font> XalanDOMChar* theElementName);
00277
00278 <font class="comment">// Data members...</font>
00279 <a class="code" href="classXalanDOMString.html">XalanDOMString</a> m_currentElementName;
00280
00281 <font class="keywordtype">bool</font> m_inBlockElem;
00282
00283 BoolStackType m_isRawStack;
00284
00285 <font class="keywordtype">bool</font> m_isScriptOrStyleElem;
00286
00287 BoolStackType m_inScriptElemStack;
00288
00289 <font class="keywordtype">bool</font> m_escapeURLs;
00290
00295 <font class="keywordtype">bool</font> m_isFirstElement;
00296
00300 <font class="keywordtype">bool</font> m_isUTF8;
00301
00305 <font class="keywordtype">int</font> m_elementLevel;
00306
00311 BoolStackType m_hasNamespaceStack;
00312
00316 <font class="keywordtype">bool</font> m_omitMetaTag;
00317
00318 ElementPropertiesStackType m_elementPropertiesStack;
00319
00320 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="classXalanDOMString.html">XalanDOMString</a> s_emptyString;
00321
00322 <font class="keyword">static</font> <font class="keyword">const</font> Entity s_entities[];
00323
00324 <font class="keyword">static</font> <font class="keyword">const</font> Entity* <font class="keyword">const</font> s_lastEntity;
00325 };
00326
00327
00328
00329 XALAN_CPP_NAMESPACE_END
00330
00331
00332
00333 <font class="preprocessor">#endif // FORMATTERTOHTML_HEADER_GUARD_1357924680</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>