00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #if !defined(XALAN_XSLTINPUTSOURCE_HEADER_GUARD) 00020 #define XALAN_XSLTINPUTSOURCE_HEADER_GUARD 00021 00022 00023 00024 // Base include file. Must be first. 00025 #include "XSLTDefinitions.hpp" 00026 00027 00028 00029 #if defined(XALAN_CLASSIC_IOSTREAMS) 00030 #include <iostream.h> 00031 #else 00032 #include <iosfwd> 00033 #endif 00034 00035 00036 00037 #include "xercesc/sax/InputSource.hpp" 00038 00039 00040 00041 #include "xalanc/Include/XalanMemoryManagement.hpp" 00042 00043 00044 00045 XALAN_DECLARE_XERCES_CLASS(Locator) 00046 00047 00048 00049 XALAN_CPP_NAMESPACE_BEGIN 00050 00051 00052 00053 typedef XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream BinInputStreamType; 00054 typedef XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType; 00055 XALAN_USING_XERCES(MemoryManager) 00056 00057 00058 class XalanDOMString; 00059 class XalanNode; 00060 00061 00062 00063 class XALAN_XSLT_EXPORT XSLTInputSource : public InputSourceType 00064 { 00065 public: 00066 00067 #if defined(XALAN_NO_STD_NAMESPACE) 00068 typedef istream StreamType; 00069 #else 00070 typedef std::istream StreamType; 00071 #endif 00072 00073 explicit 00074 XSLTInputSource(MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00075 00076 /** 00077 * Copy constructor. 00078 */ 00079 XSLTInputSource( 00080 const XSLTInputSource& theSource, 00081 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00082 00083 /** 00084 * Assignment operator. 00085 */ 00086 XSLTInputSource& 00087 operator=(const XSLTInputSource& theRHS); 00088 00089 /** 00090 * Create a new input source with a system identifier. 00091 * 00092 * <p>Applications may use setPublicId to include a public identifier as 00093 * well, or setEncoding to specify the character encoding, if known.</p> 00094 * 00095 * <p>If the system identifier is a URL, it must be full resolved.</p> 00096 * 00097 * @param systemId system identifier (URI) 00098 * @param theMemoryManager The MemoryManager instance to use. 00099 */ 00100 XSLTInputSource( 00101 const XMLCh* systemId, 00102 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00103 00104 /** 00105 * Create a new input source with a system identifier. 00106 * 00107 * <p>Applications may use setPublicId to include a public identifier as 00108 * well, or setEncoding to specify the character encoding, if known.</p> 00109 * 00110 * <p>If the system identifier is a URL, it must be full resolved.</p> 00111 * 00112 * @param systemId system identifier (URI) 00113 * @param theMemoryManager The MemoryManager instance to use. 00114 */ 00115 XSLTInputSource( 00116 const XalanDOMString& systemId, 00117 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00118 00119 /** 00120 * Create a new input source with a system identifier. 00121 * 00122 * <p>Applications may use setPublicId to include a public identifier as 00123 * well, or setEncoding to specify the character encoding, if known.</p> 00124 * 00125 * <p>If the system identifier is a URL, it must be full resolved.</p> 00126 * 00127 * @param systemId system identifier (URI) 00128 * @param theMemoryManager The MemoryManager instance to use. 00129 */ 00130 XSLTInputSource( 00131 const char* systemId, 00132 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00133 00134 /** 00135 * Create a new input source with a system identifier and a public 00136 * identifier. 00137 * 00138 * <p>If the system identifier is a URL, it must be full resolved.</p> 00139 * 00140 * @param systemId system identifier (URI) 00141 * @param publicId public identifier 00142 * @param theMemoryManager The MemoryManager instance to use. 00143 */ 00144 XSLTInputSource( 00145 const char* systemId, 00146 const char* publicId, 00147 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00148 00149 /** 00150 * Create a new input source with a system identifier and a public 00151 * identifier. 00152 * 00153 * <p>If the system identifier is a URL, it must be full resolved.</p> 00154 * 00155 * @param systemId system identifier (URI) 00156 * @param publicId public identifier 00157 * @param theMemoryManager The MemoryManager instance to use. 00158 */ 00159 XSLTInputSource( 00160 const XMLCh* systemId, 00161 const XMLCh* publicId, 00162 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00163 00164 /** 00165 * Create a new input source with a system identifier and a public 00166 * identifier. 00167 * 00168 * <p>If the system identifier is a URL, it must be full resolved.</p> 00169 * 00170 * @param systemId system identifier (URI) 00171 * @param publicId public identifier 00172 * @param theMemoryManager The MemoryManager instance to use. 00173 */ 00174 XSLTInputSource( 00175 const XalanDOMString& systemId, 00176 const XalanDOMString& publicId, 00177 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00178 00179 /** 00180 * Create a new input source with a DOM node. 00181 * 00182 * <p>Application writers may use setSystemId() to provide a base for 00183 * resolving relative URIs, and setPublicId to include a public 00184 * identifier.</p> 00185 * 00186 * @param node DOM node that is root of the document 00187 * @param theMemoryManager The MemoryManager instance to use. 00188 */ 00189 XSLTInputSource( 00190 XalanNode* node, 00191 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00192 00193 /** 00194 * Create a new input source with std stream. 00195 * 00196 * <p>Application writers may use setSystemId() to provide a base for 00197 * resolving relative URIs, and setPublicId to include a public 00198 * identifier.</p> 00199 * 00200 * @param stream the input stream... 00201 * @param theMemoryManager The MemoryManager instance to use. 00202 */ 00203 XSLTInputSource( 00204 StreamType* stream, 00205 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00206 00207 /** 00208 * Create a new input source with std stream. 00209 * 00210 * <p>Application writers may use setSystemId() to provide a base for 00211 * resolving relative URIs, and setPublicId to include a public 00212 * identifier.</p> 00213 * 00214 * @param stream the input stream... 00215 * @param theMemoryManager The MemoryManager instance to use. 00216 */ 00217 XSLTInputSource( 00218 StreamType& stream, 00219 MemoryManager& theMemoryManager = XalanMemMgrs::getDefault()); 00220 00221 /** 00222 * Makes the byte stream for this input source. 00223 * 00224 * <p>The SAX parser will ignore this if there is also a character 00225 * stream specified, but it will use a byte stream in preference 00226 * to opening a URI connection itself.</p> 00227 * 00228 * 00229 * @return pointer to byte stream created 00230 */ 00231 virtual BinInputStreamType* 00232 makeStream() const; 00233 00234 /** 00235 * Set the DOM node for this input source. 00236 * 00237 * @param node DOM node that is root of the document 00238 */ 00239 void 00240 setNode(XalanNode* node) 00241 { 00242 m_node = node; 00243 } 00244 00245 /** 00246 * Retrieve the DOM node for this input source. 00247 * 00248 * @return DOM node that is root of the document 00249 */ 00250 XalanNode* 00251 getNode() const 00252 { 00253 return m_node; 00254 } 00255 00256 StreamType* 00257 getStream() const 00258 { 00259 return m_stream; 00260 } 00261 00262 void 00263 setStream(StreamType* stream) 00264 { 00265 m_stream = stream; 00266 } 00267 00268 private: 00269 00270 StreamType* m_stream; 00271 00272 XalanNode* m_node; 00273 }; 00274 00275 00276 00277 XALAN_CPP_NAMESPACE_END 00278 00279 00280 00281 #endif // XALAN_XSLTINPUTSOURCE_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|