[Mono-bugs] [Bug 53227][Nor] New - XmlNode.WriteTo should not inherit writer namespace

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 22 Jan 2004 14:41:43 -0500 (EST)


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 lluis@ximian.com.

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

--- shadow/53227	2004-01-22 14:41:43.000000000 -0500
+++ shadow/53227.tmp.18183	2004-01-22 14:41:43.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 53227
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lluis@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlNode.WriteTo should not inherit writer namespace
+
+Run this test case:
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+public class Test
+{
+	public static void Main ()
+	{
+		XmlTextWriter w = new XmlTextWriter (Console.Out);
+		w.WriteStartElement ("docelem","a-namespace");
+		
+		XmlDocument doc = new XmlDocument ();
+		doc.CreateElement ("hola").WriteTo (w);
+		
+		w.WriteEndElement ();
+		Console.WriteLine ();
+	}
+}
+
+
+Actual Results:
+<docelem xmlns="a-namespace"><hola /></docelem>
+
+Expected Results:
+<docelem xmlns="a-namespace"><hola xmlns="" /></docelem>