2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Sun, 20 Jun 2004 18:52:23 +0000 (18:52 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Sun, 20 Jun 2004 18:52:23 +0000 (18:52 -0000)
* XmlDataInferenceLoader.cs : Kindly reject xml schema document as a
  inference target. For bug #60470. (MS does not support schema
  document inference and results in unconsistent dataset structure.)

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

mcs/class/System.Data/System.Data/ChangeLog
mcs/class/System.Data/System.Data/XmlDataInferenceLoader.cs

index 3659f8202e3c756bade7ade6c2dc3b8189f47699..f729445a8012579a00254e4d67509c15cae8d566 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlDataInferenceLoader.cs : Kindly reject xml schema document as a
+         inference target. For bug #60470. (MS does not support schema
+         document inference and results in unconsistent dataset structure.)
+
 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DataTableCollection.cs : reset the table's DataSet to null when
index 14a004137337eaf2f8101c2950da97b580e32245..ac2a4ce544479b672051d0af2c26dda0af4c1d99 100755 (executable)
@@ -182,6 +182,9 @@ namespace System.Data
                        // Read one element. It might be DataSet element.\r
                        XmlElement el = document.DocumentElement;\r
 \r
+                       if (el.NamespaceURI == XmlSchema.Namespace)\r
+                               throw new InvalidOperationException ("DataSet is not designed to handle XML Schema as data content. Please use ReadXmlSchema method instead of InferXmlSchema method.");\r
+\r
                        if (IsDocumentElementTable ())\r
                                InferTopLevelTable (el);\r
                        else {\r