[Mono-bugs] [Bug 60470][Wis] New - Exception thrown when infering Xml Schema to DataSet

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 19 Jun 2004 16:36:37 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by pbaena@uol.com.ar.

http://bugzilla.ximian.com/show_bug.cgi?id=60470

--- shadow/60470	2004-06-19 16:36:37.000000000 -0400
+++ shadow/60470.tmp.17741	2004-06-19 16:36:37.000000000 -0400
@@ -0,0 +1,69 @@
+Bug#: 60470
+Product: Mono: Class Libraries
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: pbaena@uol.com.ar               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Exception thrown when infering Xml Schema to DataSet
+
+With this code:
+
+using System;
+using System.Data;
+using System.IO;
+
+class TEst
+{
+	public static void Main ()
+	{
+		string xsd_path = "Customers.xsd";
+		DataSet ds = new DataSet();
+
+		FileStream xsd = new FileStream(xsd_path, 
+					FileMode.Open, FileAccess.Read, 
+FileShare.Read);
+
+		ds.InferXmlSchema ( xsd, null);
+
+                xsd.Close ();
+
+	}
+}
+
+
+and this schema:
+
+  <?xml version="1.0" encoding="utf-8" ?> 
+- <xs:schema id="myDataSet" targetNamespace="NetFrameWork" 
+xmlns:mstns="NetFrameWork" xmlns="NetFrameWork" 
+xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-
+microsoft-com:xml-msdata" attributeFormDefault="qualified" 
+elementFormDefault="qualified">
+- <xs:element name="myDataSet" msdata:IsDataSet="true">
+- <xs:complexType>
+- <xs:choice maxOccurs="unbounded">
+- <xs:element name="myTable">
+- <xs:complexType>
+- <xs:sequence>
+  <xs:element name="id" msdata:AutoIncrement="true" type="xs:int" 
+minOccurs="0" /> 
+  <xs:element name="item" type="xs:string" minOccurs="0" /> 
+  </xs:sequence>
+  </xs:complexType>
+  </xs:element>
+  </xs:choice>
+  </xs:complexType>
+  </xs:element>
+  </xs:schema>
+
+throws an exception in mono, and in .NET it is valid.