2 // System.Xml.XmlDocumentType.cs
\r
4 // Author: Duncan Mak (duncan@ximian.com)
\r
5 // Atsushi Enomoto (ginga@kit.hi-ho.ne.jp)
\r
10 using System.Collections;
\r
12 namespace System.Xml
\r
14 public class XmlDocumentType : XmlLinkedNode
\r
17 string name; // name of the document type
\r
18 string publicId; // public identifier on the DOCTYPE
\r
19 string systemId; // system identifier on the DOCTYPE
\r
20 string internalSubset; // value of the DTD internal subset
\r
21 internal XmlNamedNodeMap entities;
\r
22 internal XmlNamedNodeMap notations;
\r
23 internal Hashtable elementDecls;
\r
24 internal Hashtable attListDecls;
\r
27 protected internal XmlDocumentType (string name, string publicId,
\r
28 string systemId, string internalSubset,
\r
33 this.publicId = publicId;
\r
34 this.systemId = systemId;
\r
35 this.internalSubset = internalSubset;
\r
36 entities = new XmlNamedNodeMap (this);
\r
37 notations = new XmlNamedNodeMap (this);
\r
38 elementDecls = new Hashtable ();
\r
39 attListDecls = new Hashtable ();
\r
44 public XmlNamedNodeMap Entities
\r
46 get { return entities; }
\r
49 public string InternalSubset
\r
51 get { return internalSubset; }
\r
54 public override bool IsReadOnly
\r
56 get { return true; } // always return true
\r
59 public override string LocalName
\r
61 get { return name; }
\r
64 public override string Name
\r
66 get { return name; }
\r
69 public override XmlNodeType NodeType
\r
71 get { return XmlNodeType.DocumentType; }
\r
74 public XmlNamedNodeMap Notations
\r
76 get { return notations; }
\r
79 public string PublicId
\r
81 get { return publicId; }
\r
84 public string SystemId
\r
86 get { return systemId; }
\r
90 public override XmlNode CloneNode (bool deep)
\r
93 return new XmlDocumentType (name, publicId, systemId,
\r
94 internalSubset, OwnerDocument);
\r
97 public override void WriteContentTo (XmlWriter w)
\r
102 public override void WriteTo (XmlWriter w)
\r
104 w.WriteDocType (name, publicId, systemId, internalSubset);
\r