Notation.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //
  2. // Notation.h
  3. //
  4. // Library: XML
  5. // Package: DOM
  6. // Module: DOM
  7. //
  8. // Definition of the DOM Notation 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. #ifndef DOM_Notation_INCLUDED
  16. #define DOM_Notation_INCLUDED
  17. #include "Poco/XML/XML.h"
  18. #include "Poco/DOM/AbstractNode.h"
  19. #include "Poco/XML/XMLString.h"
  20. namespace Poco {
  21. namespace XML {
  22. class XML_API Notation: public AbstractNode
  23. /// This interface represents a notation declared in the DTD. A notation either
  24. /// declares, by name, the format of an unparsed entity (see section 4.7 of
  25. /// the XML 1.0 specification <http://www.w3.org/TR/2004/REC-xml-20040204/>),
  26. /// or is used for formal declaration of processing
  27. /// instruction targets (see section 2.6 of the XML 1.0 specification).
  28. /// The nodeName attribute inherited from Node is set to the declared name of
  29. /// the notation.
  30. ///
  31. /// The DOM Level 1 does not support editing Notation nodes; they are therefore
  32. /// readonly.
  33. ///
  34. /// A Notation node does not have any parent.
  35. {
  36. public:
  37. const XMLString& publicId() const;
  38. /// Returns the public identifier of this notation.
  39. /// If not specified, this is an empty string (and not null,
  40. /// as in the DOM specification).
  41. const XMLString& systemId() const;
  42. /// Returns the system identifier of this notation.
  43. /// If not specified, this is an empty string (and not null,
  44. /// as in the DOM specification).
  45. // Node
  46. const XMLString& nodeName() const;
  47. unsigned short nodeType() const;
  48. protected:
  49. Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId);
  50. Notation(Document* pOwnerDocument, const Notation& notation);
  51. ~Notation();
  52. Node* copyNode(bool deep, Document* pOwnerDocument) const;
  53. private:
  54. XMLString _name;
  55. XMLString _publicId;
  56. XMLString _systemId;
  57. friend class Document;
  58. };
  59. //
  60. // inlines
  61. //
  62. inline const XMLString& Notation::publicId() const
  63. {
  64. return _publicId;
  65. }
  66. inline const XMLString& Notation::systemId() const
  67. {
  68. return _systemId;
  69. }
  70. } } // namespace Poco::XML
  71. #endif // DOM_Notation_INCLUDED