[Mono-bugs] [Bug 57330][Cri] New - DataSet.WriteXml should not add empty namespace in column elements

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 21 Apr 2004 05:54:02 -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 borisk@mainsoft.com.

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

--- shadow/57330	2004-04-21 05:54:02.000000000 -0400
+++ shadow/57330.tmp.26372	2004-04-21 05:54:02.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 57330
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 008 One day
+Priority: Critical
+Component: Sys.Data
+AssignedTo: atsushi@ximian.com                            
+ReportedBy: borisk@mainsoft.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DataSet.WriteXml should not add empty namespace in column elements
+
+Description of Problem:
+In DataSet.WriteXml empty namespace should not be added in column elements
+
+Steps to reproduce the problem:
+1. Run the following code :
+
+DataSet ds = new DataSet();
+ds.Namespace = "namespace";
+System.Data.DataTable dt = new System.Data.DataTable("Parent");
+dt.Columns.Add("ParentId",typeof(int));
+dt.Columns.Add("String1",typeof(string));
+dt.Columns.Add("String2",typeof(string));
+dt.Rows.Add(new object[] {1,"Value1","Value2"});
+ds.Tables.Add(dt);
+string strXML = ds.GetXml();
+
+2. Examine strXML
+3. 
+
+Actual Results:
+The XML created is :
+<NewDataSet xmlns="namespace">
+  <Parent>
+    <ParentId xmlns="">1</ParentId>
+    <String1 xmlns="">Value1</String1>
+    <String2 xmlns="">Value2</String2>
+  </Parent>
+</NewDataSet>
+
+Expected Results:
+The XML created is :
+<NewDataSet xmlns="namespace">
+    <Parent>
+         <ParentId>1</ParentId>
+         <String1>Value1</String1>
+         <String2>Value2</String2>
+    </Parent>");
+</NewDataSet>
+
+
+How often does this happen? 
+Always
+
+Additional Information:
+Regression - happens since last changes in System.Data  xml generation flow.