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