diff --git a/gxml/DocumentType.vala b/gxml/DocumentType.vala index 3a48a16f0240da7adc7c8608ee9332859ff00882..97428caf328b4cb25409d68fc381c67d1955d2e9 100644 --- a/gxml/DocumentType.vala +++ b/gxml/DocumentType.vala @@ -2,42 +2,56 @@ namespace GXml.Dom { public class DocumentType : XNode { - private Xml.Dtd *dtd; + private Xml.Dtd *int_subset; + private Xml.Dtd *ext_subset; /** Constructor */ - internal DocumentType (Xml.Dtd *dtd, Document doc) { + internal DocumentType (Xml.Dtd *int_subset, Xml.Dtd *ext_subset, Document doc) { // TODO: for name, we want a real name of the doc type base (NodeType.DOCUMENT_TYPE, doc); - this.dtd = dtd; + this.int_subset = int_subset; + this.ext_subset = ext_subset; } /** Public properties */ /* That which follows DOCTYPE, e.g. xml */ - string name { + public string name { get { - return this.dtd->name; + // TODO: is it possible for int_subset and ext_subset to have different names? + return this.int_subset->name; + } + private set { } - private set; } /* using GHashTable for XML's NamedNodeMap */ - public HashTable entities { + public HashTable? entities { get { + // TODO: need to create a HashTable uniting these two + // discard duplicates // TODO: what type of hashtable is Xml.Dtd*'s entities? - return this.dtd->entities; + //return this.int_subset->entities; + // TODO: nuisance: libxml2 doesn't have entities wrapped + return null; + } + private set { } - private set; } - public HashTable notations { + public HashTable? notations { get { + // TODO: need to create a HashTable uniting the two + // discard duplicates // TODO: what type of hashtable is Xml.Dtd*'s notations? - return this.dtd->notations; + //return this.int_subset->notations; + // TODO: nuisance: libxml2 doesn't have notations wrapped + return null; + } + private set { } - private set; } }