if (this.IsComplied (schema.CompilationId))\r
return errorCount;\r
\r
+#if NET_2_0\r
+ if (ContentModel != null)\r
+ ContentModel.Parent = this;\r
+ if (Particle != null)\r
+ Particle.Parent = this;\r
+ if (AnyAttribute != null)\r
+ AnyAttribute.Parent = this;\r
+ foreach (XmlSchemaObject obj in Attributes)\r
+ obj.Parent = this;\r
+#endif\r
+\r
ValidatedIsAbstract = isAbstract;\r
\r
if (isRedefinedComponent) {\r
}\r
else\r
{\r
- if(Particle is XmlSchemaGroupRef)\r
- {\r
- XmlSchemaGroupRef xsgr = (XmlSchemaGroupRef)Particle;\r
- errorCount += xsgr.Compile(h,schema);\r
- }\r
- else if(Particle is XmlSchemaAll)\r
- {\r
- XmlSchemaAll xsa = (XmlSchemaAll)Particle;\r
- errorCount += xsa.Compile(h,schema);\r
- }\r
- else if(Particle is XmlSchemaChoice)\r
- {\r
- XmlSchemaChoice xsc = (XmlSchemaChoice)Particle;\r
- errorCount += xsc.Compile(h,schema);\r
- }\r
- else if(Particle is XmlSchemaSequence)\r
- {\r
- XmlSchemaSequence xss = (XmlSchemaSequence)Particle;\r
- errorCount += xss.Compile(h,schema);\r
- }\r
+ if (Particle != null)\r
+ errorCount += Particle.Compile (h, schema);\r
\r
if(this.anyAttribute != null)\r
{\r