2 // Mono.Xml.DTDObjectModel
5 // Atsushi Enomoto (ginga@kit.hi-ho.ne.jp)
7 // (C)2003 Atsushi Enomoto
10 using System.Collections;
16 public class DTDObjectModel
18 public DTDObjectModel ()
22 internal Hashtable ElementDecls = new Hashtable ();
23 internal Hashtable AttListDecls = new Hashtable ();
24 internal Hashtable EntityDecls = new Hashtable ();
25 internal Hashtable NotationDecls = new Hashtable ();
27 public string BaseURI {
28 // XmlStreamParser.BaseURI
29 get { return baseURI; }
34 public string PublicId;
36 public string SystemId;
38 public string InternalSubset;
43 public enum DTDContentOrderType
50 public enum DTDAttributeType
64 public enum DTDAttributeOccurenceType
72 public class DTDContentModel
74 public string ElementName;
75 public DTDContentOrderType OrderType = DTDContentOrderType.None;
76 public ArrayList ChildModels = new ArrayList ();
77 public decimal MinOccurs = 1;
78 public decimal MaxOccurs = 1;
80 internal DTDContentModel () {}
83 public class DTDElementDeclaration : ICloneable
88 public bool IsMixedContent;
89 public DTDContentModel ContentModel = new DTDContentModel ();
91 internal DTDElementDeclaration () {}
93 public object Clone ()
95 return this.MemberwiseClone ();
99 public class DTDAttributeDefinition : ICloneable
102 public DTDAttributeType AttributeType = DTDAttributeType.None;
103 // entity reference inside enumerated values are not allowed,
104 // but on the other hand, they are allowed inside default value.
105 // Then I decided to use string ArrayList for enumerated values,
106 // and unresolved string value for DefaultValue.
107 public ArrayList EnumeratedAttributeDeclaration = new ArrayList ();
108 public string UnresolvedDefaultValue = null;
109 public ArrayList EnumeratedNotations = new ArrayList();
110 public DTDAttributeOccurenceType OccurenceType = DTDAttributeOccurenceType.None;
112 internal DTDAttributeDefinition () {}
114 public object Clone ()
116 return this.MemberwiseClone ();
120 public class DTDAttListDeclaration : ICloneable
123 public Hashtable AttributeDefinitions = new Hashtable ();
125 internal DTDAttListDeclaration () {}
127 public object Clone ()
129 return this.MemberwiseClone ();
133 public class DTDEntityDeclaration
136 public string PublicId;
137 public string SystemId;
138 public string NotationName;
139 // FIXME: should have more complex value than simple string
140 public string EntityValue;
142 internal DTDEntityDeclaration () {}
145 public class DTDNotationDeclaration
148 public string LocalName;
149 public string Prefix;
150 public string PublicId;
151 public string SystemId;
153 internal DTDNotationDeclaration () {}
156 public class DTDParameterEntityDeclaration
159 public string PublicId;
160 public string SystemId;
161 public string BaseURI;