2007-10-31 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 31 Oct 2007 07:39:02 +0000 (07:39 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 31 Oct 2007 07:39:02 +0000 (07:39 -0000)
* XsdValidatingReader.cs : r68046 didn't really fix the issue.
  Enabled the actual fix. and fixed bug #336625.

* XsdValidatingReaderTests.cs : added test for #336625.

* 336625.xsd : new test file.

* Makefile : extra distfiles (336625.xsd).

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

mcs/class/System.XML/ChangeLog
mcs/class/System.XML/Makefile
mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
mcs/class/System.XML/Test/System.Xml/ChangeLog
mcs/class/System.XML/Test/System.Xml/XsdValidatingReaderTests.cs
mcs/class/System.XML/Test/XmlFiles/xsd/336495.xsd [new file with mode: 0644]
mcs/class/System.XML/Test/XmlFiles/xsd/ChangeLog

index 7638a14ec44b02b5e1bf076cc3ad03a40b2af033..1795d18bd9bc8d00a0530551ebd990dc586c769c 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-31  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * Makefile : extra distfiles (336625.xsd).
+
 2007-09-21  Atsushi Enomoto  <atsushi@ximian.com>
 
        * Makefile : extra distfiles (325482.xml / 325482.xsl).
index 3bdea052573f4dc66de120c6fe1d6324c610812a..63de70bc366e4c708f6878b199ffc41368fe5566 100644 (file)
@@ -72,6 +72,7 @@ EXTRA_DISTFILES = \
        Test/XmlFiles/79683.dtd         \
        Test/XmlFiles/xsd/multi-schemaLocation.xml \
        Test/XmlFiles/xsd/datatypesTest.xsd \
+       Test/XmlFiles/xsd/336625.xsd    \
        Test/XmlFiles/xsd/77687.xsd     \
        Test/XmlFiles/xsd/77687inc.xsd  \
        Test/XmlFiles/xsd/78985.xml     \
index 4ccb09307dc43df98b10ede8cf116b81516c8df6..413a0c2d4bdddbc9f0dbe55b8c08296b135fb08f 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-31  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XsdValidatingReader.cs : r68046 didn't really fix the issue.
+         Enabled the actual fix. and fixed bug #336625.
+
 2007-07-25  Atsushi Enomoto <atsushi@ximian.com>
 
        * XsdValidatingReader.cs : reject more whitespaces in empty model
index 7dbc5f49154a34eaa7f9f684e03da7a002d68c22..5234533fa636ea39f5b777e0431c1ae215addc47 100644 (file)
@@ -1488,8 +1488,7 @@ namespace Mono.Xml.Schema
 
                private void ExamineAdditionalSchema ()
                {
-//                     if (resolver == null || ValidationType == ValidationType.None)
-                       if (resolver == null)
+                       if (resolver == null || ValidationType == ValidationType.None)
                                return;
                        XmlSchema schema = null;
                        string schemaLocation = reader.GetAttribute ("schemaLocation", XmlSchema.InstanceNamespace);
index 0bd41f41f56cb58bdaf1407b1f6991eabca12504..6c174bb189567b6b6bf2a8d47fff6cf0874685de 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-31  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XsdValidatingReaderTests.cs : added test for #336625.
+
 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XmlConvertTest.cs : added test for DateTime roundtrip.
index 977fafdba5259a950f6a790e9e11229a3f1f765b..812595cbb85df210d5cfc7db7427878b7ebd8fcf 100644 (file)
@@ -363,6 +363,17 @@ namespace MonoTests.System.Xml
                                vr.Read ();\r
                }\r
 \r
+               [Test] // bug #336625\r
+               public void ValidationTypeNoneIgnoreLocatedSchemaErrors ()\r
+               {\r
+                       string xml = "<test xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='Test/XmlFiles/xsd/336625.xsd'/>";\r
+                       XmlValidatingReader vr = new XmlValidatingReader (\r
+                               new XmlTextReader (new StringReader (xml)));\r
+                       vr.ValidationType = ValidationType.None;\r
+                       while (!vr.EOF)\r
+                               vr.Read ();\r
+               }\r
+\r
                [Test]\r
                public void Bug81360 ()\r
                {\r
diff --git a/mcs/class/System.XML/Test/XmlFiles/xsd/336495.xsd b/mcs/class/System.XML/Test/XmlFiles/xsd/336495.xsd
new file mode 100644 (file)
index 0000000..acf2178
--- /dev/null
@@ -0,0 +1,9 @@
+<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+<xs:element name='test' type='testType' />
+<xs:complexType name="testType">
+  <xs:complexContent>
+    <xs:restriction base="nonexistent">
+    </xs:restriction>
+  </xs:complexContent>
+</xs:complexType>
+</xs:schema>
index 8d59a5b019a5a7e0b6c3697399c12cac046fb51e..fb824996a876e8ffff70d1be74c7c1814c76c0bb 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-31  Atsushi Enomoto <atsushi@ximian.com>
+
+       * 336625.xsd : new test file.
+
 2007-08-21  Atsushi Enomoto <atsushi@ximian.com>
 
        * 82078.xsd : new test file.