<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:44:18 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>XSLTResultTarget.hpp</h1><a href="XSLTResultTarget.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="comment"> * $ Id: $ </font>00058 <font class="comment"> </font>00059 <font class="comment"> */</font> 00060 00061 <font class="preprocessor">#if !defined(XALAN_XSLTRESULTTARGET_HEADER_GUARD) </font><a name="l00062"></a><a class="code" href="XSLTResultTarget.hpp.html#a0">00062</a> <font class="preprocessor"></font><font class="preprocessor">#define XALAN_XSLTRESULTTARGET_HEADER_GUARD </font>00063 <font class="preprocessor"></font> 00064 <font class="comment">// Base include file. Must be first.</font> 00065 <font class="preprocessor">#include "<a class="code" href="XSLTDefinitions.hpp.html">XSLTDefinitions.hpp</a>"</font> 00066 00067 00068 00069 <font class="preprocessor">#if defined(XALAN_OLD_STREAM_HEADERS) </font>00070 <font class="preprocessor"></font><font class="preprocessor">#include <iostream.h></font> 00071 <font class="preprocessor">#else </font>00072 <font class="preprocessor"></font><font class="preprocessor">#if defined(XALAN_NO_IOSFWD) </font>00073 <font class="preprocessor"></font><font class="preprocessor">#include <ostream></font> 00074 <font class="preprocessor">#else </font>00075 <font class="preprocessor"></font><font class="preprocessor">#include <iosfwd></font> 00076 <font class="preprocessor">#endif </font>00077 <font class="preprocessor"></font><font class="preprocessor">#endif </font>00078 <font class="preprocessor"></font> 00079 00080 00081 <font class="preprocessor">#include <<a class="code" href="XalanDOMString.hpp.html">XalanDOM/XalanDOMString.hpp</a>></font> 00082 00083 00084 00085 <font class="preprocessor">#include <<a class="code" href="FormatterListener.hpp.html">XMLSupport/FormatterListener.hpp</a>></font> 00086 00087 00088 00089 <font class="keyword">class </font><a class="code" href="class_xalandocument.html">XalanDocument</a>; 00090 <font class="keyword">class </font><a class="code" href="class_xalandocumentfragment.html">XalanDocumentFragment</a>; 00091 <font class="keyword">class </font><a class="code" href="class_xalanelement.html">XalanElement</a>; 00092 <font class="keyword">class </font><a class="code" href="class_writer.html">Writer</a>; 00093 00094 00095 <a name="l00096"></a><a class="code" href="class_xsltresulttarget.html">00096</a> <font class="keyword">class </font>XALAN_XSLT_EXPORT <a class="code" href="class_xsltresulttarget.html">XSLTResultTarget</a> 00097 { 00098 <font class="keyword">public</font>: 00099 00100 <font class="keyword">explicit</font> 00101 <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(); 00102 00108 <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& fileName); 00109 00115 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES) </font>00116 <font class="preprocessor"></font> <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(ostream* theStream); 00117 <font class="preprocessor">#else </font>00118 <font class="preprocessor"></font> <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(std::ostream* theStream); 00119 <font class="preprocessor">#endif </font>00120 <font class="preprocessor"></font> 00127 <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(<a class="code" href="class_writer.html">Writer</a>* characterStream); 00128 00134 <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(<a class="code" href="class_xalandocument.html">XalanDocument</a>* document); 00135 00141 <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(<a class="code" href="class_xalandocumentfragment.html">XalanDocumentFragment</a>* documentFragment); 00142 00148 <a class="code" href="class_xsltresulttarget.html#a0">XSLTResultTarget</a>(<a class="code" href="class_xalanelement.html">XalanElement</a>* element); 00149 00155 <font class="keywordtype">void</font> <a name="l00156"></a><a class="code" href="class_xsltresulttarget.html#a7">00156</a> <a class="code" href="class_xsltresulttarget.html#a7">setFileName</a>(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& fileName)<font class="keyword"> </font>00157 <font class="keyword"> </font>{ 00158 m_fileName = fileName; 00159 } 00160 00166 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& <a name="l00167"></a><a class="code" href="class_xsltresulttarget.html#a8">00167</a> <a class="code" href="class_xsltresulttarget.html#a8">getFileName</a>()<font class="keyword"> const </font>00168 <font class="keyword"> </font>{ 00169 <font class="keywordflow">return</font> m_fileName; 00170 } 00171 00178 <font class="keywordtype">void</font> 00179 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES) </font>00180 <font class="preprocessor"></font> <a class="code" href="class_xsltresulttarget.html#a9">setByteStream</a>(ostream* byteStream) 00181 <font class="preprocessor">#else </font><a name="l00182"></a><a class="code" href="class_xsltresulttarget.html#a9">00182</a> <font class="preprocessor"></font> <a class="code" href="class_xsltresulttarget.html#a9">setByteStream</a>(std::ostream* byteStream) 00183 <font class="preprocessor">#endif </font>00184 <font class="preprocessor"></font> { 00185 m_byteStream = byteStream; 00186 } 00187 00193 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES) </font>00194 <font class="preprocessor"></font> ostream* 00195 <font class="preprocessor">#else </font>00196 <font class="preprocessor"></font> std::ostream* 00197 <font class="preprocessor">#endif </font><a name="l00198"></a><a class="code" href="class_xsltresulttarget.html#a10">00198</a> <font class="preprocessor"></font> <a class="code" href="class_xsltresulttarget.html#a10">getByteStream</a>()<font class="keyword"> const </font>00199 <font class="keyword"> </font>{ 00200 <font class="keywordflow">return</font> m_byteStream; 00201 } 00202 00208 <font class="keywordtype">void</font> <a name="l00209"></a><a class="code" href="class_xsltresulttarget.html#a11">00209</a> <a class="code" href="class_xsltresulttarget.html#a11">setEncoding</a>(<font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& encoding)<font class="keyword"> </font>00210 <font class="keyword"> </font>{ 00211 m_encoding = encoding; 00212 } 00213 00219 <font class="keyword">const</font> <a class="code" href="class_xalandomstring.html">XalanDOMString</a>& <a name="l00220"></a><a class="code" href="class_xsltresulttarget.html#a12">00220</a> <a class="code" href="class_xsltresulttarget.html#a12">getEncoding</a>()<font class="keyword"> const </font>00221 <font class="keyword"> </font>{ 00222 <font class="keywordflow">return</font> m_encoding; 00223 } 00224 00231 <font class="keywordtype">void</font> <a name="l00232"></a><a class="code" href="class_xsltresulttarget.html#a13">00232</a> <a class="code" href="class_xsltresulttarget.html#a13">setCharacterStream</a>(<a class="code" href="class_writer.html">Writer</a>* characterStream)<font class="keyword"> </font>00233 <font class="keyword"> </font>{ 00234 m_characterStream = characterStream; 00235 } 00236 00242 <a class="code" href="class_writer.html">Writer</a>* <a name="l00243"></a><a class="code" href="class_xsltresulttarget.html#a14">00243</a> <a class="code" href="class_xsltresulttarget.html#a14">getCharacterStream</a>()<font class="keyword"> const </font>00244 <font class="keyword"> </font>{ 00245 <font class="keywordflow">return</font> m_characterStream; 00246 } 00247 00248 <font class="keywordtype">bool</font> <a name="l00249"></a><a class="code" href="class_xsltresulttarget.html#a15">00249</a> <a class="code" href="class_xsltresulttarget.html#a15">hasDOMTarget</a>()<font class="keyword"> const </font>00250 <font class="keyword"> </font>{ 00251 <font class="keywordflow">return</font> m_document != 0 || m_documentFragment != 0 || m_element != 0; 00252 } 00253 00259 <font class="keywordtype">void</font> <a name="l00260"></a><a class="code" href="class_xsltresulttarget.html#a16">00260</a> <a class="code" href="class_xsltresulttarget.html#a16">setDocument</a>(<a class="code" href="class_xalandocument.html">XalanDocument</a>* document)<font class="keyword"> </font>00261 <font class="keyword"> </font>{ 00262 m_document = document; 00263 00264 m_documentFragment = 0; 00265 m_element = 0; 00266 } 00267 00273 <a class="code" href="class_xalandocument.html">XalanDocument</a>* <a name="l00274"></a><a class="code" href="class_xsltresulttarget.html#a17">00274</a> <a class="code" href="class_xsltresulttarget.html#a17">getDocument</a>()<font class="keyword"> const </font>00275 <font class="keyword"> </font>{ 00276 <font class="keywordflow">return</font> m_document; 00277 } 00278 00284 <font class="keywordtype">void</font> <a name="l00285"></a><a class="code" href="class_xsltresulttarget.html#a18">00285</a> <a class="code" href="class_xsltresulttarget.html#a18">setDocumentFragment</a>(<a class="code" href="class_xalandocumentfragment.html">XalanDocumentFragment</a>* documentFragment)<font class="keyword"> </font>00286 <font class="keyword"> </font>{ 00287 m_documentFragment = documentFragment; 00288 00289 m_document = 0; 00290 m_element = 0; 00291 } 00292 00298 <a class="code" href="class_xalandocumentfragment.html">XalanDocumentFragment</a>* <a name="l00299"></a><a class="code" href="class_xsltresulttarget.html#a19">00299</a> <a class="code" href="class_xsltresulttarget.html#a19">getDocumentFragment</a>()<font class="keyword"> const </font>00300 <font class="keyword"> </font>{ 00301 <font class="keywordflow">return</font> m_documentFragment; 00302 } 00303 00309 <font class="keywordtype">void</font> <a name="l00310"></a><a class="code" href="class_xsltresulttarget.html#a20">00310</a> <a class="code" href="class_xsltresulttarget.html#a20">setElement</a>(<a class="code" href="class_xalanelement.html">XalanElement</a>* element)<font class="keyword"> </font>00311 <font class="keyword"> </font>{ 00312 m_element = element; 00313 00314 m_documentFragment = 0; 00315 m_document = 0; 00316 } 00317 00323 <a class="code" href="class_xalanelement.html">XalanElement</a>* <a name="l00324"></a><a class="code" href="class_xsltresulttarget.html#a21">00324</a> <a class="code" href="class_xsltresulttarget.html#a21">getElement</a>()<font class="keyword"> const </font>00325 <font class="keyword"> </font>{ 00326 <font class="keywordflow">return</font> m_element; 00327 } 00328 00334 <font class="keywordtype">void</font> <a name="l00335"></a><a class="code" href="class_xsltresulttarget.html#a22">00335</a> <a class="code" href="class_xsltresulttarget.html#a22">setDocumentHandler</a>(<a class="code" href="class_formatterlistener.html">FormatterListener</a>* handler)<font class="keyword"> </font>00336 <font class="keyword"> </font>{ 00337 m_formatterListener = handler; 00338 } 00339 00345 <a class="code" href="class_formatterlistener.html">FormatterListener</a>* <a name="l00346"></a><a class="code" href="class_xsltresulttarget.html#a23">00346</a> <a class="code" href="class_xsltresulttarget.html#a23">getDocumentHandler</a>()<font class="keyword"> const </font>00347 <font class="keyword"> </font>{ 00348 <font class="keywordflow">return</font> m_formatterListener; 00349 } 00350 00356 <font class="keywordtype">void</font> <a name="l00357"></a><a class="code" href="class_xsltresulttarget.html#a24">00357</a> <a class="code" href="class_xsltresulttarget.html#a24">setFormatterListener</a>(<a class="code" href="class_formatterlistener.html">FormatterListener</a>* handler)<font class="keyword"> </font>00358 <font class="keyword"> </font>{ 00359 m_formatterListener = handler; 00360 } 00361 00367 <a class="code" href="class_formatterlistener.html">FormatterListener</a>* <a name="l00368"></a><a class="code" href="class_xsltresulttarget.html#a25">00368</a> <a class="code" href="class_xsltresulttarget.html#a25">getFormatterListener</a>()<font class="keyword"> const </font>00369 <font class="keyword"> </font>{ 00370 <font class="keywordflow">return</font> m_formatterListener; 00371 } 00372 00373 <font class="keyword">private</font>: 00374 00375 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> m_fileName; 00376 00377 <font class="preprocessor">#if defined(XALAN_NO_NAMESPACES) </font>00378 <font class="preprocessor"></font> ostream* m_byteStream; 00379 <font class="preprocessor">#else </font>00380 <font class="preprocessor"></font> std::ostream* m_byteStream; 00381 <font class="preprocessor">#endif </font>00382 <font class="preprocessor"></font> 00383 <a class="code" href="class_xalandomstring.html">XalanDOMString</a> m_encoding; 00384 00385 <a class="code" href="class_writer.html">Writer</a>* m_characterStream; 00386 00387 <a class="code" href="class_xalandocument.html">XalanDocument</a>* m_document; 00388 00389 <a class="code" href="class_xalandocumentfragment.html">XalanDocumentFragment</a>* m_documentFragment; 00390 00391 <a class="code" href="class_xalanelement.html">XalanElement</a>* m_element; 00392 00393 <a class="code" href="class_formatterlistener.html">FormatterListener</a>* m_formatterListener; 00394 }; 00395 00396 00397 00398 <font class="preprocessor">#endif // XALAN_XSLTRESULTTARGET_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>