diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-01-30 11:13:06 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-01-30 11:13:06 +0300 |
commit | 4c6adc47ba086520f89394e26175b59d726375d9 (patch) | |
tree | db690777f4d8ea1ea833d3b19f01134d47ffa7cc /mcs/class/System.XML/System.Xml.Schema | |
parent | 0fc59854a998f0e047470f7cffd7593eb03713df (diff) |
2009-01-30 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaElement.cs : to reference elementFormDefault, use its
ancestor, not the schema island root.
svn path=/trunk/mcs/; revision=125058
Diffstat (limited to 'mcs/class/System.XML/System.Xml.Schema')
-rw-r--r-- | mcs/class/System.XML/System.Xml.Schema/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog index 163e3f4a5e8..0250b26800e 100644 --- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog +++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog @@ -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 diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs index 9c80dd35872..5f3a214d2b6 100644 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs @@ -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); |