Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

FormatterToDeprecatedXercesDOM.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(FORMATTERTODEPRECATEDXERCESDOM_HEADER_GUARD_1357924680)
17 #define FORMATTERTODEPRECATEDXERCESDOM_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
30 // Base class header file.
32 
33 
34 
36 
37 
38 
40 
41 // Required Xerces headers
42 
43 #if XERCES_VERSION_MAJOR >= 2
44 #include <xercesc/dom/deprecated/DOM_Document.hpp>
45 #include <xercesc/dom/deprecated/DOM_DocumentFragment.hpp>
46 #include <xercesc/dom/deprecated/DOM_Element.hpp>
47 #else
48 #include <xercesc/dom/DOM_Document.hpp>
49 #include <xercesc/dom/DOM_DocumentFragment.hpp>
50 #include <xercesc/dom/DOM_Element.hpp>
51 #endif
52 
53 
54 XALAN_CPP_NAMESPACE_BEGIN
55 
56 
57 
67 {
68 public:
69 
80  DOM_Document_Type &doc,
81  DOM_DocumentFragmentType &docFrag,
82  DOM_ElementType &currentElement);
83 
93  DOM_Document_Type &doc,
94  DOM_ElementType &currentElement);
95 
104  DOM_Document_Type &doc);
105 
106  virtual
108 
109 
110  // These methods are inherited from DocumentHandler ...
111 
112  virtual void
114  const XMLCh* const chars,
115  const unsigned int length);
116 
117  virtual void
118  comment(const XMLCh* const data);
119 
120  virtual void
121  cdata(
122  const XMLCh* const ch,
123  const unsigned int length);
124 
125  virtual void
126  entityReference(const XMLCh* const name);
127 
128  virtual void
129  setDocumentLocator(const LocatorType* const locator);
130 
131  virtual void
132  startDocument();
133 
134  virtual void
135  endDocument();
136 
137  virtual void
138  startElement(
139  const XMLCh* const name,
140  AttributeListType& attrs);
141 
142  virtual void
143  endElement(const XMLCh* const name);
144 
145  virtual void
146  characters(
147  const XMLCh* const chars,
148  const unsigned int length);
149 
150  virtual void
152  const XMLCh* const chars,
153  const unsigned int length);
154 
155  virtual void
157  const XMLCh* const target,
158  const XMLCh* const data);
159 
160  virtual void
161  resetDocument();
162 
164  getDocument() const
165  {
166  return m_doc;
167  }
168 
169  void
170  setDocument(DOM_Document_Type &theDocument)
171  {
172  m_doc = theDocument;
173  }
174 
176  getDocumentFragment() const
177  {
178  return m_docFrag;
179  }
180 
181  void
182  setDocumentFragment(DOM_DocumentFragmentType &theDocumentFragment)
183  {
184  m_docFrag = theDocumentFragment;
185  }
186 
188  getCurrentElement() const
189  {
190  return m_currentElem;
191  }
192 
193  void
194  setCurrentElement(DOM_ElementType &theElement)
195  {
196  m_currentElem = theElement;
197  }
198 
199 private:
200 
204  void
205  processAccumulatedText();
206 
210  void
211  append(DOM_NodeType &newNode);
212 
221  createElement(
222  const XalanDOMChar* theElementName,
223  AttributeListType& attrs);
224 
225  void
226  addAttributes(
227  DOM_ElementType &theElement,
228  AttributeListType& attrs);
229 
230 
231  // Data members...
232  DOM_Document_Type m_doc;
233 
234  DOM_DocumentFragmentType m_docFrag;
235 
236  DOM_ElementType m_currentElem;
237 
238  typedef XalanVector<DOM_ElementType> ElementStackType;
239 
240  ElementStackType m_elemStack;
241 
242  XalanDOMString m_buffer;
243 
244  XalanDOMString m_textBuffer;
245 
246  static const XalanDOMString s_emptyString;
247 };
248 
249 
250 
251 XALAN_CPP_NAMESPACE_END
252 
253 
254 
255 #endif // FORMATTERTODEPRECATEDXERCESDOM_HEADER_GUARD_1357924680

Interpreting class diagrams

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

dot

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

Apache Logo