29 #ifndef Pt_Xml_DocTypeDefinition_h
30 #define Pt_Xml_DocTypeDefinition_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>
46 class AttributeListModel;
50 class DocTypeDefinition;
113 ContentModel& declareContent(
const QName& name);
116 AttributeListModel& declareAttributeList(
const QName& name);
119 ElementModel* findElement(
const QName& name);
122 AttributeListModel* findAttributes(
const QName& name);
125 typedef std::vector<ElementModel*> Elements;
126 typedef std::vector<Notation*> Notations;
127 typedef std::vector<Entity*> Entities;
132 Entities _paramEntities;
133 Notations _notations;
142 #endif // Pt_Xml_DocTypeDefinition_h
Core module.
Definition: Allocator.h:33
Notation * declareNotation(const Pt::String &name)
Returns the notation or a nullptr if already declared.
const Entity * findEntity(const Pt::String &name) const
Returns the entity or a nullptr if not declared.
~DocTypeDefinition()
Destructor.
bool isDefined() const
Returns true if a DTD was defined in the document.
An entity declaration in a DTD.
Definition: Entity.h:45
QName & rootName()
Returns the documents root element name.
void removeNotation(const Pt::String &name)
Removes the notation with the given name.
const Notation * findNotation(const Pt::String &name) const
Returns the notation or a nullptr if not declared.
DocTypeDefinition()
Construct an empty DocType node.
A qualified XML name.
Definition: QName.h:47
Entity * declareParamEntity(const Pt::String &name)
Returns the entity or a nullptr if already declared.
Unicode capable basic_string.
Definition: Api-String.h:44
Protects derived classes from being copied.
Definition: NonCopyable.h:54
The DocTypeDefinition of an XML document.
Definition: DocTypeDefinition.h:58
void removeParamEntity(const Pt::String &name)
Removes the entity with the given name.
A notation declaration in a DTD.
Definition: Notation.h:42
const Entity * findParamEntity(const Pt::String &name) const
Returns the entity or a nullptr if not declared.
void clear()
Clears all content.
Entity * declareEntity(const Pt::String &name)
Returns the entity or a nullptr if already declared.
void removeEntity(const Pt::String &name)
Removes the entity with the given name.
const QName & rootName() const
Returns the documents root element name.