[Mono-bugs] [Bug 64210][Nor] New - The BaseURI of a clone of a file backed XmlNode is not reset to an empty string

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 26 Aug 2004 16:21:50 -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 gert.driesen@pandora.be.

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

--- shadow/64210	2004-08-26 16:21:50.000000000 -0400
+++ shadow/64210.tmp.24036	2004-08-26 16:21:50.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 64210
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: Gentoo 2.6.8 r2 / Windows XP SP2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: The BaseURI of a clone of a file backed XmlNode is not reset to an empty string
+
+On Mono, a clone of an XML node that is backed by a file, is not reset to 
+an empty string.
+
+Compile and run the following code fragment (make sure you have an XML 
+file named "test.xml" in the current directory) :
+
+using System;
+using System.Xml;
+
+public class EntryPoint {
+  public static void Main() {
+    XmlDocument doc = new XmlDocument();
+    doc.Load("test.xml");
+
+    XmlNode node = doc.DocumentElement;
+    Console.WriteLine("NODE BASE URI: " + node.BaseURI);
+	
+    XmlNode nodeClone = node.Clone();
+    Console.WriteLine("CLONED NODE BASE URI: " + nodeClone.BaseURI);
+  }
+}
+
+On Mono you'll get the following result (the URI may vary depending on 
+your local directory) :
+
+NODE BASE URI: file:///C:/test/test.xml
+CLONED NODE BASE URI: file:///C:/test/test.xml
+
+While on MS.NET, you'll get :
+
+NODE BASE URI: file:///C:/test/test.xml
+CLONED NODE BASE URI:
+
+The MS result is correct in this case.