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>
37#include <Pt/NonCopyable.h>
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);
Base class that disables copy construction and assignment.
Definition NonCopyable.h:59
Unicode capable basic_string.
Definition Api-String.h:67
The DocTypeDefinition of an XML document.
Definition DocTypeDefinition.h:58
const DocType & toDocType(const Node &node)
Casts a generic node to a DocType node.
Definition DocType.h:146
const Pt::String & systemId() const
Returns the system ID of the external subset.
Definition DocType.h:96
DocType & toDocType(Node &node)
Casts a generic node to a DocType node.
Definition DocType.h:137
bool isExternal() const
Returns true if the external DTD subset begins.
void setSystemId(const Pt::String &sysId)
Sets the system ID of the external subset.
Definition DocType.h:101
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 setPublicId(const Pt::String &pubId)
Sets the public ID of the external subset.
Definition DocType.h:91
const DocType * toDocType(const Node *node)
Casts a generic node to a DocType node.
Definition DocType.h:128
void setInternal(bool hasInternal)
Indicates the begin of internal or external DTD subsets.
const QName & rootName() const
Returns the documents root element name.
void clear()
Clears all content.
DocType(DocTypeDefinition &dtd)
Construct an empty DocType node.
bool isInternal() const
Returns true if the internal DTD subset begins.
void setInternal(bool value)
Indicates the end of internal or external DTD subsets.
bool isExternal() const
Returns true if the external DTD subset begins.
EndDocType & toEndDocType(Node &node)
Casts a generic node to a EndDocType node.
Definition DocType.h:216
const EndDocType * toEndDocType(const Node *node)
Casts a generic node to a EndDocType node.
Definition DocType.h:207
EndDocType * toEndDocType(Node *node)
Casts a generic node to a EndDocType node.
Definition DocType.h:198
void clear()
Clears all content.
EndDocType()
Construct an empty DocType node.
bool isInternal() const
Returns true if the internal DTD subset begins.
const EndDocType & toEndDocType(const Node &node)
Casts a generic node to a EndDocType node.
Definition DocType.h:225
Node(Type type)
Constructs a new Node object with the specified node type.
Definition Node.h:80
A qualified XML name.
Definition QName.h:47
Read and write XML ducuments.
Core module.
Definition Allocator.h:33