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;
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);
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
const EndDocType * toEndDocType(const Node *node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:207
Core module.
Definition: pt-gfx-images.dox:14
const Pt::String & systemId() const
Returns the system ID of the external subset.
Definition: DocType.h:96
A DocType node represents the begin of a DTD.
Definition: DocType.h:54
bool isExternal() const
Returns true if the external DTD subset begins.
const QName & rootName() const
Returns the documents root element name.
const EndDocType & toEndDocType(const Node &node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:225
const DocType & toDocType(const Node &node)
Casts a generic node to a DocType node.
Definition: DocType.h:146
EndDocType & toEndDocType(Node &node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:216
EndDocType * toEndDocType(Node *node)
Casts a generic node to a EndDocType node.
Definition: DocType.h:198
DocType(DocTypeDefinition &dtd)
Construct an empty DocType node.
DocType & toDocType(Node &node)
Casts a generic node to a DocType node.
Definition: DocType.h:137
void setInternal(bool value)
Indicates the end of internal or external DTD subsets.
void clear()
Clears all content.
void setSystemId(const Pt::String &sysId)
Sets the system ID of the external subset.
Definition: DocType.h:101
An EndDocType node represents the end of a DTD.
Definition: DocType.h:160
DocType * toDocType(Node *node)
Casts a generic node to a DocType node.
Definition: DocType.h:119
const Pt::String & publicId() const
Returns the public ID of the external subset.
Definition: DocType.h:86
void clear()
Clears all content.
XML document node.
Definition: Node.h:51
bool isInternal() const
Returns true if the internal DTD subset begins.
void setPublicId(const Pt::String &pubId)
Sets the public ID of the external subset.
Definition: DocType.h:91
A qualified XML name.
Definition: QName.h:47
const DocType * toDocType(const Node *node)
Casts a generic node to a DocType node.
Definition: DocType.h:128
bool isExternal() const
Returns true if the external DTD subset begins.
bool isInternal() const
Returns true if the internal DTD subset begins.
Unicode capable basic_string.
Definition: String.h:43
Protects derived classes from being copied.
Definition: NonCopyable.h:54
EndDocType()
Construct an empty DocType node.
The DocTypeDefinition of an XML document.
Definition: DocTypeDefinition.h:58
void setInternal(bool hasInternal)
Indicates the begin of internal or external DTD subsets.