diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-12-15 13:39:00 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-12-15 13:39:00 +0300 |
commit | 3bfb4f73d03a8bc5229dec84d51b8748a6c121fc (patch) | |
tree | 145b818044627e5050167faa1b8cc2ed9560fff4 /mcs/class/System.XML/Test | |
parent | 8a5366d7afbec1f310e0c868e0b90c692e23ca6e (diff) |
2008-12-15 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchema.cs, XmlSchemaSet.cs : move substitutionGroup processing
from validation phase to post-subset-collection phase. It caused
inconsistent substitutionGroup processing among import and
schemaSet.Schemas(). Fixed possible XBRL schema processing.
* XmlSchemaSetTests.cs : added test for Compile() after "duplicating"
call to Add() for such schemas that also have xs:import of the
same schema that causes errors on processing substitutionGroup.
svn path=/trunk/mcs/; revision=121509
Diffstat (limited to 'mcs/class/System.XML/Test')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog index 41c9eb69481..79bbb708238 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog @@ -1,3 +1,9 @@ +2008-12-15 Atsushi Enomoto <atsushi@ximian.com> + + * XmlSchemaSetTests.cs : added test for Compile() after "duplicating" + call to Add() for such schemas that also have xs:import of the + same schema that causes errors on processing substitutionGroup. + 2008-10-28 Atsushi Enomoto <atsushi@ximian.com> * XmlSchemaValidatorTests.cs : added test for bug #435206. diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs index 86d1d55815a..6318ba5b2d5 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs @@ -193,6 +193,22 @@ type=""xsd:string"" use=""required""/> schemas.Add (XmlSchema.Read (new StringReader (schema2), null)); schemas.Compile (); } + + [Test] + public void ImportSubstitutionGroupDBR () + { + // This bug happened when + // 1) a schema imports another schema, + // 2) there is a substitutionGroup which is involved in + // complexContent schema conformance check, and + // 3) the included schema is already added to XmlSchemaSet. + XmlSchemaSet xss = new XmlSchemaSet (); + xss.Add (null, "Test/XmlFiles/xsd/import-subst-dbr-base.xsd"); + xss.Add (null, "Test/XmlFiles/xsd/import-subst-dbr-ext.xsd"); + // should not result in lack of substitutionGroup + // (and conformance error as its result) + xss.Compile (); + } } } #endif |