Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XSLTInputSource.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #if !defined(XALAN_XSLTINPUTSOURCE_HEADER_GUARD)
20 #define XALAN_XSLTINPUTSOURCE_HEADER_GUARD
21 
22 
23 
24 // Base include file. Must be first.
25 #include "XSLTDefinitions.hpp"
26 
27 
28 
29 #if defined(XALAN_CLASSIC_IOSTREAMS)
30 #include <iostream.h>
31 #else
32 #include <iosfwd>
33 #endif
34 
35 
36 
37 #include "xercesc/sax/InputSource.hpp"
38 
39 
40 
42 
43 
44 
45 XALAN_DECLARE_XERCES_CLASS(Locator)
46 
47 
48 
49 XALAN_CPP_NAMESPACE_BEGIN
50 
51 
52 
53 typedef XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream BinInputStreamType;
54 typedef XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType;
55 XALAN_USING_XERCES(MemoryManager)
56 
57 
58 class XalanDOMString;
59 class XalanNode;
60 
61 
62 
64 {
65 public:
66 
67 #if defined(XALAN_NO_STD_NAMESPACE)
68  typedef istream StreamType;
69 #else
70  typedef std::istream StreamType;
71 #endif
72 
73  explicit
74  XSLTInputSource(MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
75 
76  /**
77  * Copy constructor.
78  */
80  const XSLTInputSource& theSource,
81  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
82 
83  /**
84  * Assignment operator.
85  */
87  operator=(const XSLTInputSource& theRHS);
88 
89  /**
90  * Create a new input source with a system identifier.
91  *
92  * <p>Applications may use setPublicId to include a public identifier as
93  * well, or setEncoding to specify the character encoding, if known.</p>
94  *
95  * <p>If the system identifier is a URL, it must be full resolved.</p>
96  *
97  * @param systemId system identifier (URI)
98  * @param theMemoryManager The MemoryManager instance to use.
99  */
101  const XMLCh* systemId,
102  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
103 
104  /**
105  * Create a new input source with a system identifier.
106  *
107  * <p>Applications may use setPublicId to include a public identifier as
108  * well, or setEncoding to specify the character encoding, if known.</p>
109  *
110  * <p>If the system identifier is a URL, it must be full resolved.</p>
111  *
112  * @param systemId system identifier (URI)
113  * @param theMemoryManager The MemoryManager instance to use.
114  */
116  const XalanDOMString& systemId,
117  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
118 
119  /**
120  * Create a new input source with a system identifier.
121  *
122  * <p>Applications may use setPublicId to include a public identifier as
123  * well, or setEncoding to specify the character encoding, if known.</p>
124  *
125  * <p>If the system identifier is a URL, it must be full resolved.</p>
126  *
127  * @param systemId system identifier (URI)
128  * @param theMemoryManager The MemoryManager instance to use.
129  */
131  const char* systemId,
132  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
133 
134  /**
135  * Create a new input source with a system identifier and a public
136  * identifier.
137  *
138  * <p>If the system identifier is a URL, it must be full resolved.</p>
139  *
140  * @param systemId system identifier (URI)
141  * @param publicId public identifier
142  * @param theMemoryManager The MemoryManager instance to use.
143  */
145  const char* systemId,
146  const char* publicId,
147  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
148 
149  /**
150  * Create a new input source with a system identifier and a public
151  * identifier.
152  *
153  * <p>If the system identifier is a URL, it must be full resolved.</p>
154  *
155  * @param systemId system identifier (URI)
156  * @param publicId public identifier
157  * @param theMemoryManager The MemoryManager instance to use.
158  */
160  const XMLCh* systemId,
161  const XMLCh* publicId,
162  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
163 
164  /**
165  * Create a new input source with a system identifier and a public
166  * identifier.
167  *
168  * <p>If the system identifier is a URL, it must be full resolved.</p>
169  *
170  * @param systemId system identifier (URI)
171  * @param publicId public identifier
172  * @param theMemoryManager The MemoryManager instance to use.
173  */
175  const XalanDOMString& systemId,
176  const XalanDOMString& publicId,
177  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
178 
179  /**
180  * Create a new input source with a DOM node.
181  *
182  * <p>Application writers may use setSystemId() to provide a base for
183  * resolving relative URIs, and setPublicId to include a public
184  * identifier.</p>
185  *
186  * @param node DOM node that is root of the document
187  * @param theMemoryManager The MemoryManager instance to use.
188  */
190  XalanNode* node,
191  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
192 
193  /**
194  * Create a new input source with std stream.
195  *
196  * <p>Application writers may use setSystemId() to provide a base for
197  * resolving relative URIs, and setPublicId to include a public
198  * identifier.</p>
199  *
200  * @param stream the input stream...
201  * @param theMemoryManager The MemoryManager instance to use.
202  */
204  StreamType* stream,
205  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
206 
207  /**
208  * Create a new input source with std stream.
209  *
210  * <p>Application writers may use setSystemId() to provide a base for
211  * resolving relative URIs, and setPublicId to include a public
212  * identifier.</p>
213  *
214  * @param stream the input stream...
215  * @param theMemoryManager The MemoryManager instance to use.
216  */
218  StreamType& stream,
219  MemoryManager& theMemoryManager = XalanMemMgrs::getDefault());
220 
221  /**
222  * Makes the byte stream for this input source.
223  *
224  * <p>The SAX parser will ignore this if there is also a character
225  * stream specified, but it will use a byte stream in preference
226  * to opening a URI connection itself.</p>
227  *
228  *
229  * @return pointer to byte stream created
230  */
231  virtual BinInputStreamType*
232  makeStream() const;
233 
234  /**
235  * Set the DOM node for this input source.
236  *
237  * @param node DOM node that is root of the document
238  */
239  void
241  {
242  m_node = node;
243  }
244 
245  /**
246  * Retrieve the DOM node for this input source.
247  *
248  * @return DOM node that is root of the document
249  */
250  XalanNode*
251  getNode() const
252  {
253  return m_node;
254  }
255 
256  StreamType*
257  getStream() const
258  {
259  return m_stream;
260  }
261 
262  void
263  setStream(StreamType* stream)
264  {
265  m_stream = stream;
266  }
267 
268 private:
269 
270  StreamType* m_stream;
271 
272  XalanNode* m_node;
273 };
274 
275 
276 
277 XALAN_CPP_NAMESPACE_END
278 
279 
280 
281 #endif // XALAN_XSLTINPUTSOURCE_HEADER_GUARD
std::istream StreamType
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream BinInputStreamType
StreamType * getStream() const
void setStream(StreamType *stream)
void setNode(XalanNode *node)
Set the DOM node for this input source.
XalanNode * getNode() const
Retrieve the DOM node for this input source.
static MemoryManager & getDefault()
#define XALAN_XSLT_EXPORT
XERCES_CPP_NAMESPACE_QUALIFIER InputSource InputSourceType
XALAN_CPP_NAMESPACE_BEGIN XALAN_USING_XERCES(Locator)

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo