Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

FormatterToDOM.hpp

Go to the documentation of this file.
00001 /* 00002 * Copyright 1999-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #if !defined(FORMATTERTODOM_HEADER_GUARD_1357924680) 00017 #define FORMATTERTODOM_HEADER_GUARD_1357924680 00018 00019 00020 00021 // Base include file. Must be first. 00022 #include <xalanc/XMLSupport/XMLSupportDefinitions.hpp> 00023 00024 00025 00026 #include <vector> 00027 00028 00029 00030 // Base class header file. 00031 #include <xalanc/PlatformSupport/FormatterListener.hpp> 00032 00033 00034 00035 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00036 00037 00038 00039 XALAN_CPP_NAMESPACE_BEGIN 00040 00041 00042 00043 class XalanDocument; 00044 class XalanDocumentFragment; 00045 class XalanElement; 00046 class XalanNode; 00047 00048 00049 00056 class XALAN_XMLSUPPORT_EXPORT FormatterToDOM : public FormatterListener 00057 { 00058 public: 00059 00060 #if defined(XALAN_NO_STD_NAMESPACE) 00061 typedef vector<XalanElement*> ElementStackType; 00062 #else 00063 typedef std::vector<XalanElement*> ElementStackType; 00064 #endif 00065 00074 FormatterToDOM( 00075 XalanDocument* doc, 00076 XalanDocumentFragment* docFrag, 00077 XalanElement* currentElement); 00078 00086 FormatterToDOM( 00087 XalanDocument* doc, 00088 XalanElement* elem); 00089 00090 virtual 00091 ~FormatterToDOM(); 00092 00093 00094 // These methods are inherited from DocumentHandler ... 00095 00096 virtual void 00097 charactersRaw( 00098 const XMLCh* const chars, 00099 const unsigned int length); 00100 00101 virtual void 00102 comment(const XMLCh* const data); 00103 00104 virtual void 00105 cdata( 00106 const XMLCh* const ch, 00107 const unsigned int length); 00108 00109 virtual void 00110 entityReference(const XMLCh* const name); 00111 00112 virtual void 00113 setDocumentLocator(const LocatorType* const locator); 00114 00115 virtual void 00116 startDocument(); 00117 00118 virtual void 00119 endDocument(); 00120 00121 virtual void 00122 startElement( 00123 const XMLCh* const name, 00124 AttributeListType& attrs); 00125 00126 virtual void 00127 endElement(const XMLCh* const name); 00128 00129 virtual void 00130 characters( 00131 const XMLCh* const chars, 00132 const unsigned int length); 00133 00134 virtual void 00135 ignorableWhitespace( 00136 const XMLCh* const chars, 00137 const unsigned int length); 00138 00139 virtual void 00140 processingInstruction( 00141 const XMLCh* const target, 00142 const XMLCh* const data); 00143 00144 virtual void 00145 resetDocument(); 00146 00147 XalanDocument* 00148 getDocument() const 00149 { 00150 return m_doc; 00151 } 00152 00153 void 00154 setDocument(XalanDocument* theDocument) 00155 { 00156 m_doc = theDocument; 00157 } 00158 00159 XalanDocumentFragment* 00160 getDocumentFragment() const 00161 { 00162 return m_docFrag; 00163 } 00164 00165 void 00166 setDocumentFragment(XalanDocumentFragment* theDocumentFragment) 00167 { 00168 m_docFrag = theDocumentFragment; 00169 } 00170 00171 XalanElement* 00172 getCurrentElement() const 00173 { 00174 return m_currentElem; 00175 } 00176 00177 void 00178 setCurrentElement(XalanElement* theElement) 00179 { 00180 m_currentElem = theElement; 00181 } 00182 00183 private: 00184 00188 void 00189 append(XalanNode* newNode); 00190 00198 XalanElement* 00199 createElement( 00200 const XalanDOMChar* theElementName, 00201 AttributeListType& attrs); 00202 00203 void 00204 addAttributes( 00205 XalanElement* theElement, 00206 AttributeListType& attrs); 00207 00208 00209 // Data members... 00210 XalanDocument* m_doc; 00211 00212 XalanDocumentFragment* m_docFrag; 00213 00214 XalanElement* m_currentElem; 00215 00216 ElementStackType m_elemStack; 00217 00218 XalanDOMString m_buffer1; 00219 00220 XalanDOMString m_buffer2; 00221 00222 static const XalanDOMString s_emptyString; 00223 }; 00224 00225 00226 00227 XALAN_CPP_NAMESPACE_END 00228 00229 00230 00231 #endif // FORMATTERTODOM_HEADER_GUARD_1357924680

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.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.