00001 /* 00002 * The Apache Software License, Version 1.1 00003 * 00004 * 00005 * Copyright (c) 1999 The Apache Software Foundation. All rights 00006 * reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright 00013 * notice, this list of conditions and the following disclaimer. 00014 * 00015 * 2. Redistributions in binary form must reproduce the above copyright 00016 * notice, this list of conditions and the following disclaimer in 00017 * the documentation and/or other materials provided with the 00018 * distribution. 00019 * 00020 * 3. The end-user documentation included with the redistribution, 00021 * if any, must include the following acknowledgment: 00022 * "This product includes software developed by the 00023 * Apache Software Foundation (http://www.apache.org/)." 00024 * Alternately, this acknowledgment may appear in the software itself, 00025 * if and wherever such third-party acknowledgments normally appear. 00026 * 00027 * 4. The names "Xalan" and "Apache Software Foundation" must 00028 * not be used to endorse or promote products derived from this 00029 * software without prior written permission. For written 00030 * permission, please contact apache@apache.org. 00031 * 00032 * 5. Products derived from this software may not be called "Apache", 00033 * nor may "Apache" appear in their name, without prior written 00034 * permission of the Apache Software Foundation. 00035 * 00036 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 00037 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00038 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00039 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 00040 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00041 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00042 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 00043 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00044 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00045 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00046 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00047 * SUCH DAMAGE. 00048 * ==================================================================== 00049 * 00050 * This software consists of voluntary contributions made by many 00051 * individuals on behalf of the Apache Software Foundation and was 00052 * originally based on software copyright (c) 1999, International 00053 * Business Machines, Inc., http://www.ibm.com. For more 00054 * information on the Apache Software Foundation, please see 00055 * <http://www.apache.org/>. 00056 * 00057 * $ Id: $ 00058 00059 */ 00060 00061 #if !defined(XALAN_XSLTRESULTTARGET_HEADER_GUARD) 00062 #define XALAN_XSLTRESULTTARGET_HEADER_GUARD 00063 00064 // Base include file. Must be first. 00065 #include "XSLTDefinitions.hpp" 00066 00067 00068 00069 #if defined(XALAN_OLD_STREAMS) 00070 class ostream; 00071 #else 00072 #include <iosfwd> 00073 #endif 00074 00075 00076 00077 #include <XalanDOM/XalanDOMString.hpp> 00078 00079 00080 00081 class FormatterListener; 00082 class XalanDocument; 00083 class XalanDocumentFragment; 00084 class XalanElement; 00085 class Writer; 00086 00087 00088 00089 class XALAN_XSLT_EXPORT XSLTResultTarget 00090 { 00091 public: 00092 00093 explicit 00094 XSLTResultTarget(); 00095 00101 XSLTResultTarget(const XalanDOMString& fileName); 00102 00108 XSLTResultTarget(const char* fileName); 00109 00115 #if defined(XALAN_NO_NAMESPACES) 00116 XSLTResultTarget(ostream* theStream); 00117 #else 00118 XSLTResultTarget(std::ostream* theStream); 00119 #endif 00120 00126 #if defined(XALAN_NO_NAMESPACES) 00127 XSLTResultTarget(ostream& theStream); 00128 #else 00129 XSLTResultTarget(std::ostream& theStream); 00130 #endif 00131 00138 XSLTResultTarget(Writer* characterStream); 00139 00145 XSLTResultTarget(XalanDocument* document); 00146 00152 XSLTResultTarget(XalanDocumentFragment* documentFragment); 00153 00159 XSLTResultTarget(XalanElement* element); 00160 00166 XSLTResultTarget(FormatterListener& flistener); 00167 00173 void 00174 setFileName(const XalanDOMString& fileName) 00175 { 00176 m_fileName = fileName; 00177 } 00178 00184 const XalanDOMString& 00185 getFileName() const 00186 { 00187 return m_fileName; 00188 } 00189 00196 void 00197 #if defined(XALAN_NO_NAMESPACES) 00198 setByteStream(ostream* byteStream) 00199 #else 00200 setByteStream(std::ostream* byteStream) 00201 #endif 00202 { 00203 m_byteStream = byteStream; 00204 } 00205 00211 #if defined(XALAN_NO_NAMESPACES) 00212 ostream* 00213 #else 00214 std::ostream* 00215 #endif 00216 getByteStream() const 00217 { 00218 return m_byteStream; 00219 } 00220 00226 void 00227 setEncoding(const XalanDOMString& encoding) 00228 { 00229 m_encoding = encoding; 00230 } 00231 00237 const XalanDOMString& 00238 getEncoding() const 00239 { 00240 return m_encoding; 00241 } 00242 00249 void 00250 setCharacterStream(Writer* characterStream) 00251 { 00252 m_characterStream = characterStream; 00253 } 00254 00260 Writer* 00261 getCharacterStream() const 00262 { 00263 return m_characterStream; 00264 } 00265 00266 bool 00267 hasDOMTarget() const 00268 { 00269 return m_document != 0 || m_documentFragment != 0 || m_element != 0; 00270 } 00271 00277 void 00278 setDocument(XalanDocument* document) 00279 { 00280 m_document = document; 00281 00282 m_documentFragment = 0; 00283 m_element = 0; 00284 } 00285 00291 XalanDocument* 00292 getDocument() const 00293 { 00294 return m_document; 00295 } 00296 00302 void 00303 setDocumentFragment(XalanDocumentFragment* documentFragment) 00304 { 00305 m_documentFragment = documentFragment; 00306 00307 m_document = 0; 00308 m_element = 0; 00309 } 00310 00316 XalanDocumentFragment* 00317 getDocumentFragment() const 00318 { 00319 return m_documentFragment; 00320 } 00321 00327 void 00328 setElement(XalanElement* element) 00329 { 00330 m_element = element; 00331 00332 m_documentFragment = 0; 00333 m_document = 0; 00334 } 00335 00341 XalanElement* 00342 getElement() const 00343 { 00344 return m_element; 00345 } 00346 00352 void 00353 setDocumentHandler(FormatterListener* handler) 00354 { 00355 m_formatterListener = handler; 00356 } 00357 00363 FormatterListener* 00364 getDocumentHandler() const 00365 { 00366 return m_formatterListener; 00367 } 00368 00374 void 00375 setFormatterListener(FormatterListener* handler) 00376 { 00377 m_formatterListener = handler; 00378 } 00379 00385 FormatterListener* 00386 getFormatterListener() const 00387 { 00388 return m_formatterListener; 00389 } 00390 00391 private: 00392 00393 XalanDOMString m_fileName; 00394 00395 #if defined(XALAN_NO_NAMESPACES) 00396 ostream* m_byteStream; 00397 #else 00398 std::ostream* m_byteStream; 00399 #endif 00400 00401 XalanDOMString m_encoding; 00402 00403 Writer* m_characterStream; 00404 00405 XalanDocument* m_document; 00406 00407 XalanDocumentFragment* m_documentFragment; 00408 00409 XalanElement* m_element; 00410 00411 FormatterListener* m_formatterListener; 00412 }; 00413 00414 00415 00416 #endif // XALAN_XSLTRESULTTARGET_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.4 |
|