| 1 | // | 
|---|
| 2 | // DOMImplementation.h | 
|---|
| 3 | // | 
|---|
| 4 | // Library: XML | 
|---|
| 5 | // Package: DOM | 
|---|
| 6 | // Module:  DOM | 
|---|
| 7 | // | 
|---|
| 8 | // Definition of the DOM DOMImplementation class. | 
|---|
| 9 | // | 
|---|
| 10 | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | 
|---|
| 11 | // and Contributors. | 
|---|
| 12 | // | 
|---|
| 13 | // SPDX-License-Identifier:	BSL-1.0 | 
|---|
| 14 | // | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | #ifndef DOM_DOMImplementation_INCLUDED | 
|---|
| 18 | #define DOM_DOMImplementation_INCLUDED | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | #include "Poco/XML/XML.h" | 
|---|
| 22 | #include "Poco/XML/XMLString.h" | 
|---|
| 23 |  | 
|---|
| 24 |  | 
|---|
| 25 | namespace Poco { | 
|---|
| 26 | namespace XML { | 
|---|
| 27 |  | 
|---|
| 28 |  | 
|---|
| 29 | class DocumentType; | 
|---|
| 30 | class Document; | 
|---|
| 31 | class NamePool; | 
|---|
| 32 |  | 
|---|
| 33 |  | 
|---|
| 34 | class XML_API DOMImplementation | 
|---|
| 35 | /// The DOMImplementation interface provides a number of methods for | 
|---|
| 36 | /// performing operations that are independent of any particular instance | 
|---|
| 37 | /// of the document object model. | 
|---|
| 38 | /// In this implementation, DOMImplementation is implemented as a singleton. | 
|---|
| 39 | { | 
|---|
| 40 | public: | 
|---|
| 41 | DOMImplementation(); | 
|---|
| 42 | /// Creates the DOMImplementation. | 
|---|
| 43 |  | 
|---|
| 44 | ~DOMImplementation(); | 
|---|
| 45 | /// Destroys the DOMImplementation. | 
|---|
| 46 |  | 
|---|
| 47 | bool hasFeature(const XMLString& feature, const XMLString& version) const; | 
|---|
| 48 | /// Tests if the DOM implementation implements a specific feature. | 
|---|
| 49 | /// | 
|---|
| 50 | /// The only supported features are "XML", version "1.0" and "Core", | 
|---|
| 51 | /// "Events", "MutationEvents" and "Traversal", version "2.0". | 
|---|
| 52 |  | 
|---|
| 53 | // DOM Level 2 | 
|---|
| 54 | DocumentType* createDocumentType(const XMLString& name, const XMLString& publicId, const XMLString& systemId) const; | 
|---|
| 55 | /// Creates an empty DocumentType node. Entity declarations and notations | 
|---|
| 56 | /// are not made available. Entity reference expansions and default attribute | 
|---|
| 57 | /// additions do not occur. | 
|---|
| 58 |  | 
|---|
| 59 | Document* createDocument(const XMLString& namespaceURI, const XMLString& qualifiedName, DocumentType* doctype) const; | 
|---|
| 60 | /// Creates an XML Document object of the specified type with its document element. | 
|---|
| 61 | /// | 
|---|
| 62 | /// Note: You can also create a Document directly using the new operator. | 
|---|
| 63 |  | 
|---|
| 64 | static const DOMImplementation& instance(); | 
|---|
| 65 | /// Returns a reference to the default DOMImplementation | 
|---|
| 66 | /// object. | 
|---|
| 67 |  | 
|---|
| 68 | private: | 
|---|
| 69 | static const XMLString FEATURE_XML; | 
|---|
| 70 | static const XMLString FEATURE_CORE; | 
|---|
| 71 | static const XMLString FEATURE_EVENTS; | 
|---|
| 72 | static const XMLString FEATURE_MUTATIONEVENTS; | 
|---|
| 73 | static const XMLString FEATURE_TRAVERSAL; | 
|---|
| 74 | static const XMLString VERSION_1_0; | 
|---|
| 75 | static const XMLString VERSION_2_0; | 
|---|
| 76 | }; | 
|---|
| 77 |  | 
|---|
| 78 |  | 
|---|
| 79 | } } // namespace Poco::XML | 
|---|
| 80 |  | 
|---|
| 81 |  | 
|---|
| 82 | #endif // DOM_DOMImplementation_INCLUDED | 
|---|
| 83 |  | 
|---|