internal ArrayList unhandledAttributeList ;
internal bool isCompiled = false;
internal int errorCount = 0;
- internal Guid CompilationId;
+ internal Guid compilation_id;
internal Guid ValidationId;
internal bool isRedefineChild;
internal bool isRedefinedComponent;
internal XmlSchemaObject redefinedObject;
-#if NET_2_0
private XmlSchemaObject parent;
-#endif
protected XmlSchemaObject()
{
namespaces = new XmlSerializerNamespaces();
unhandledAttributeList = null;
- CompilationId = Guid.Empty;
+ compilation_id = Guid.Empty;
+ }
+
+ internal Guid CompilationId {
+ get { return compilation_id; }
+ set {
+ if (value.Equals (Guid.Empty))
+ throw new ArgumentException ("value must not be empty");
+ compilation_id = value;
+ }
}
[XmlIgnore]
#if NET_2_0
[XmlIgnore]
- public XmlSchemaObject Parent {
+ public
+#else
+ internal
+#endif
+ XmlSchemaObject Parent {
get { return parent; }
set { parent = value; }
}
-#endif
+
+ internal XmlSchema AncestorSchema {
+ get {
+
+ for (XmlSchemaObject o = Parent; o != null; o = o.Parent)
+ if (o is XmlSchema)
+ return (XmlSchema) o;
+ throw new Exception (String.Format ("INTERNAL ERROR: Parent object is not set properly : {0} ({1},{2})", SourceUri, LineNumber, LinePosition));
+ }
+ }
+
+ internal virtual void SetParent (XmlSchemaObject parent)
+ {
+ Parent = parent;
+ }
// Undocumented Property
[XmlNamespaceDeclarations]