29 #ifndef Pt_Xml_DocType_h
30 #define Pt_Xml_DocType_h
32 #include <Pt/Xml/Api.h>
33 #include <Pt/Xml/Node.h>
34 #include <Pt/Xml/QName.h>
35 #include <Pt/String.h>
37 #include <Pt/NonCopyable.h>
43 class DocTypeDefinition;
70 bool isExternal()
const;
74 bool isInternal()
const;
78 void setInternal(
bool hasInternal);
82 const QName& rootName()
const;
92 { _publicId = pubId; }
102 { _systemId = sysId; }
105 inline static Node::Type nodeId()
106 {
return Node::DocType; }
109 DocTypeDefinition* _dtd;
112 Pt::varint_t _internal;
121 return nodeCast<DocType>(node);
130 return nodeCast<DocType>(node);
139 return nodeCast<DocType>(node);
148 return nodeCast<DocType>(node);
176 bool isExternal()
const;
180 bool isInternal()
const;
184 void setInternal(
bool value);
187 inline static Node::Type nodeId()
188 {
return Node::EndDocType; }
191 Pt::varint_t _internal;
200 return nodeCast<EndDocType>(node);
209 return nodeCast<EndDocType>(node);
218 return nodeCast<EndDocType>(node);
227 return nodeCast<EndDocType>(node);
234 #endif // Pt_Xml_DocType_h
A DocType node represents the begin of a DTD.
Definition: DocType.h:52
EndDocType & toEndDocType(Node &node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:216
Protects derived classes from being copied.
Definition: NonCopyable.h:54
DocType * toDocType(Node *node)
Casts a generic node to a DocType node.
Definition: DocType.h:119
const EndDocType * toEndDocType(const Node *node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:207
const EndDocType & toEndDocType(const Node &node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:225
A qualified XML name.
Definition: QName.h:46
const DocType * toDocType(const Node *node)
Casts a generic node to a DocType node.
Definition: DocType.h:128
const DocType & toDocType(const Node &node)
Casts a generic node to a DocType node.
Definition: DocType.h:146
const Pt::String & publicId() const
Returns the public ID of the external subset.
Definition: DocType.h:86
The DocTypeDefinition of an XML document.
Definition: DocTypeDefinition.h:57
EndDocType * toEndDocType(Node *node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:198
DocType & toDocType(Node &node)
Casts a generic node to a DocType node.
Definition: DocType.h:137
An EndDocType node represents the end of a DTD.
Definition: DocType.h:158
Unicode capable basic_string.
Definition: String.h:42
void setPublicId(const Pt::String &pubId)
Sets the public ID of the external subset.
Definition: DocType.h:91
void setSystemId(const Pt::String &sysId)
Sets the system ID of the external subset.
Definition: DocType.h:101
XML document node.
Definition: Node.h:50
const Pt::String & systemId() const
Returns the system ID of the external subset.
Definition: DocType.h:96