## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

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

# FormatterToDeprecatedXercesDOM.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(FORMATTERTODEPRECATEDXERCESDOM_HEADER_GUARD_1357924680)
    00017 #define FORMATTERTODEPRECATEDXERCESDOM_HEADER_GUARD_1357924680
    00018
    00019
    00020
    00021 // Base include file.  Must be first.
    00022 #include <xalanc/XercesParserLiaison/XercesParserLiaisonDefinitions.hpp>
    00023
    00024
    00025
    00026 #include <xalanc/Include/XalanVector.hpp>
    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 #include <xalanc/XercesParserLiaison/Deprecated/XercesBridgeTypes.hpp>
    00040
    00041 // Required Xerces headers
    00042
    00043 #if XERCES_VERSION_MAJOR >= 2
    00044 #include <xercesc/dom/deprecated/DOM_Document.hpp>
    00045 #include <xercesc/dom/deprecated/DOM_DocumentFragment.hpp>
    00046 #include <xercesc/dom/deprecated/DOM_Element.hpp>
    00047 #else
    00048 #include <xercesc/dom/DOM_Document.hpp>
    00049 #include <xercesc/dom/DOM_DocumentFragment.hpp>
    00050 #include <xercesc/dom/DOM_Element.hpp>
    00051 #endif
    00052
    00053
    00054 XALAN_CPP_NAMESPACE_BEGIN
    00055
    00056
    00057
    00066 class XALAN_XERCESPARSERLIAISON_EXPORT FormatterToDeprecatedXercesDOM : public FormatterListener
    00067 {
    00068 public:
    00069
    00079     FormatterToDeprecatedXercesDOM(
    00080             DOM_Document_Type           &doc,
    00081             DOM_DocumentFragmentType    &docFrag,
    00082             DOM_ElementType             &currentElement);
    00083
    00092     FormatterToDeprecatedXercesDOM(
    00093             DOM_Document_Type           &doc,
    00094             DOM_ElementType             &currentElement);
    00095
    00103     FormatterToDeprecatedXercesDOM(
    00104             DOM_Document_Type           &doc);
    00105
    00106     virtual
    00107     ~FormatterToDeprecatedXercesDOM();
    00108
    00109
    00110     // These methods are inherited from DocumentHandler ...
    00111
    00112     virtual void
    00113     charactersRaw(
    00114             const XMLCh* const  chars,
    00115             const unsigned int  length);
    00116
    00117     virtual void
    00118     comment(const XMLCh* const  data);
    00119
    00120     virtual void
    00121     cdata(
    00122             const XMLCh* const  ch,
    00123             const unsigned int  length);
    00124
    00125     virtual void
    00126     entityReference(const XMLCh* const  name);
    00127
    00128     virtual void
    00129     setDocumentLocator(const LocatorType* const     locator);
    00130
    00131     virtual void
    00132     startDocument();
    00133
    00134     virtual void
    00135     endDocument();
    00136
    00137     virtual void
    00138     startElement(
    00139                 const   XMLCh* const    name,
    00140                 AttributeListType&      attrs);
    00141
    00142     virtual void
    00143     endElement(const XMLCh* const   name);
    00144
    00145     virtual void
    00146     characters(
    00147                 const XMLCh* const  chars,
    00148                 const unsigned int  length);
    00149
    00150     virtual void
    00151     ignorableWhitespace(
    00152                 const XMLCh* const  chars,
    00153                 const unsigned int  length);
    00154
    00155     virtual void
    00156     processingInstruction(
    00157             const XMLCh* const  target,
    00158             const XMLCh* const  data);
    00159
    00160     virtual void
    00161     resetDocument();
    00162
    00163     DOM_Document_Type
    00164     getDocument() const
    00165     {
    00166         return m_doc;
    00167     }
    00168
    00169     void
    00170     setDocument(DOM_Document_Type   &theDocument)
    00171     {
    00172         m_doc = theDocument;
    00173     }
    00174
    00175     DOM_DocumentFragmentType
    00176     getDocumentFragment() const
    00177     {
    00178         return m_docFrag;
    00179     }
    00180
    00181     void
    00182     setDocumentFragment(DOM_DocumentFragmentType    &theDocumentFragment)
    00183     {
    00184         m_docFrag = theDocumentFragment;
    00185     }
    00186
    00187     DOM_ElementType
    00188     getCurrentElement() const
    00189     {
    00190         return m_currentElem;
    00191     }
    00192
    00193     void
    00194     setCurrentElement(DOM_ElementType       &theElement)
    00195     {
    00196         m_currentElem = theElement;
    00197     }
    00198
    00199 private:
    00200
    00204     void
    00205     processAccumulatedText();
    00206
    00210     void
    00211     append(DOM_NodeType     &newNode);
    00212
    00220     DOM_ElementType
    00221     createElement(
    00222             const XalanDOMChar*     theElementName,
    00223             AttributeListType&      attrs);
    00224
    00225     void
    00226     addAttributes(
    00227             DOM_ElementType         &theElement,
    00228             AttributeListType&  attrs);
    00229
    00230
    00231     // Data members...
    00232     DOM_Document_Type               m_doc;
    00233
    00234     DOM_DocumentFragmentType        m_docFrag;
    00235
    00236     DOM_ElementType                 m_currentElem;
    00237
    00238     typedef XalanVector<DOM_ElementType>            ElementStackType;
    00239
    00240     ElementStackType                m_elemStack;
    00241
    00242     XalanDOMString                  m_buffer;
    00243
    00244     XalanDOMString                  m_textBuffer;
    00245
    00246     static const XalanDOMString     s_emptyString;
    00247 };
    00248
    00249
    00250
    00251 XALAN_CPP_NAMESPACE_END
    00252
    00253
    00254
    00255 #endif  // FORMATTERTODEPRECATEDXERCESDOM_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.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.