2009-01-30 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 30 Jan 2009 08:13:06 +0000 (08:13 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 30 Jan 2009 08:13:06 +0000 (08:13 -0000)
* XmlSchemaElement.cs : to reference elementFormDefault, use its
  ancestor, not the schema island root.

svn path=/trunk/mcs/; revision=125058

mcs/class/System.XML/System.Xml.Schema/ChangeLog
mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs

index 163e3f4a5e810e603138e334fffa8d0523587424..0250b26800e60c48c11638e9c72c4e309607d9fe 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-30  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlSchemaElement.cs : to reference elementFormDefault, use its
+         ancestor, not the schema island root.
+
 2008-12-15  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XmlSchema.cs, XmlSchemaSet.cs : move substitutionGroup processing
index 9c80dd3587268d904ef6af6a67cea074aeda3035..5f3a214d2b6963c0a1e7280850ff321e15a3245b 100644 (file)
@@ -452,7 +452,7 @@ namespace System.Xml.Schema
                                {
                                        string targetNamespace = String.Empty;
 
-                                       if(form == XmlSchemaForm.Qualified || (form == XmlSchemaForm.None && schema.ElementFormDefault == XmlSchemaForm.Qualified))
+                                       if(form == XmlSchemaForm.Qualified || (form == XmlSchemaForm.None && AncestorSchema.ElementFormDefault == XmlSchemaForm.Qualified))
                                                targetNamespace = AncestorSchema.TargetNamespace;
 
                                        if(this.name == null)   //b1
@@ -926,7 +926,7 @@ namespace System.Xml.Schema
                                                }
                                        } else {
                                                if (any.TargetNamespace != this.QualifiedName.Namespace)
-                                                       error (h, "Ambiguous element label which is contained by -any- particle with ##other value was detected: " + this.QualifiedName);
+                                                       error (h, String.Format ("Ambiguous element label '{0}' which is contained by -any- particle with ##other value than '{1}' was detected: ", this.QualifiedName.Namespace, any.TargetNamespace));
                                        }
                                }
                                qnames.Add (this.QualifiedName, this);