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>
37#include <Pt/NonCopyable.h>
46class AttributeListModel;
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;
NonCopyable()
Default constructor.
Definition NonCopyable.h:63
Unicode capable basic_string.
Definition Api-String.h:67
The DocTypeDefinition of an XML document.
Definition DocTypeDefinition.h:58
Entity * declareParamEntity(const Pt::String &name)
Returns the entity or a nullptr if already declared.
void removeNotation(const Pt::String &name)
Removes the notation with the given name.
QName & rootName()
Returns the documents root element name.
void removeEntity(const Pt::String &name)
Removes the entity with the given name.
Entity * declareEntity(const Pt::String &name)
Returns the entity or a nullptr if already declared.
Notation * declareNotation(const Pt::String &name)
Returns the notation or a nullptr if already declared.
const Notation * findNotation(const Pt::String &name) const
Returns the notation or a nullptr if not declared.
DocTypeDefinition()
Construct an empty DocType node.
bool isDefined() const
Returns true if a DTD was defined in the document.
const QName & rootName() const
Returns the documents root element name.
const Entity * findEntity(const Pt::String &name) const
Returns the entity or a nullptr if not declared.
void clear()
Clears all content.
void removeParamEntity(const Pt::String &name)
Removes the entity with the given name.
~DocTypeDefinition()
Destructor.
const Entity * findParamEntity(const Pt::String &name) const
Returns the entity or a nullptr if not declared.
An entity declaration in a DTD.
Definition Entity.h:45
A notation declaration in a DTD.
Definition Notation.h:42
A qualified XML name.
Definition QName.h:47
Read and write XML ducuments.
Core module.
Definition Allocator.h:33