From eaec15743561b8c09a3ec343c8e857f2bf59a342 Mon Sep 17 00:00:00 2001 From: Richard Schwarting Date: Wed, 6 Jul 2011 23:04:15 -0400 Subject: [PATCH] * get closer to supporting DocumentType; need to amalgamate notations and entites once we can get access to them. --- gxml/DocumentType.vala | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/gxml/DocumentType.vala b/gxml/DocumentType.vala index 3a48a16f..97428caf 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; } } -- GitLab