home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////
- //
- // Doc.h
- //
- // This file was generated by XMLSPY 5 Enterprise Edition.
- //
- // YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
- // OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
- //
- // Refer to the XMLSPY Documentation for further details.
- // http://www.altova.com/xmlspy
- //
- ////////////////////////////////////////////////////////////////////////
-
-
- #ifndef ALTOVA_DOC_H_INCLUDED
- #define ALTOVA_DOC_H_INCLUDED
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
-
- namespace altova {
-
-
- class CNode;
-
-
- class ALTOVA_DECLSPECIFIER CDoc
- {
- public: // protected:
- static xercesc::DOMImplementation* GetImplementationCore();
- static xercesc::DOMImplementationLS* GetImplementationLS();
- static xercesc::DOMBuilder* GetBuilder();
- static xercesc::DOMWriter* GetWriter();
- static xercesc::DOMDocument* GetDocument();
- static xercesc::DOMNode* CreateFragment();
- static void ReleaseFragment(xercesc::DOMNode* pDOMNode);
-
- protected:
- static xercesc::DOMImplementation* sm_ImplementationCore;
- static xercesc::DOMImplementationLS* sm_ImplementationLS;
- static xercesc::DOMBuilder* sm_Builder;
- static xercesc::DOMWriter* sm_Writer;
- static xercesc::DOMDocument* sm_Document;
- static xercesc::DOMDocumentFragment* sm_Fragment;
- static int sm_nTmpNameCounter;
- static int sm_nFragmentCounter;
- static int sm_nBuilderCounter;
- static int sm_nWriterCounter;
-
- public:
- CDoc();
- virtual ~CDoc();
- xercesc::DOMDocument* Load(const tstring& sURI);
- void Save(const tstring& sURI, CNode& rNode, bool bQualified = true);
- void SetRootElementName(const tstring& sNamespaceURI, const tstring& sName);
- void SetSchemaLocation(const tstring& sSchemaLocation);
- void SetDTDLocation(const tstring& sSchemaLocation);
- void RemoveSchemaLocation();
-
- protected:
- void FinalizeRootElement(CNode& rNode);
- virtual void DeclareNamespaces(xercesc::DOMElement* pElement) = 0;
- void DeclareNamespace(xercesc::DOMElement* pElement, const tstring& sPrefix, const tstring& sURI);
-
- protected:
- typedef enum
- {
- None,
- DTD,
- Schema
- } ESchemaType;
-
- tstring m_sRootElementName;
- tstring m_sRootElementNamespaceURI;
- tstring m_sSchemaLocation;
- ESchemaType m_eSchemaType;
- bool m_bBuilder;
- bool m_bWriter;
- };
-
-
- } // namespace altova
-
- #endif // ALTOVA_DOC_H_INCLUDED
-