[Mono-bugs] [Bug 76264][Wis] Changed - XslTransform throws exception with standalone output

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Sep 28 22:01:34 EDT 2005

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 csaba.halasz at gmail.com.


--- shadow/76264	2005-09-28 15:07:02.000000000 -0400
+++ shadow/76264.tmp.31649	2005-09-28 22:01:34.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 76264
 Product: Mono: Class Libraries
 Version: 1.1
 OS: GNU/Linux [Other]
 OS Details: 
-Status: NEW   
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Wishlist
 Component: Sys.XML
 AssignedTo: atsushi at ximian.com                            
 ReportedBy: Csaba.Halasz at gmail.com               
 QAContact: mono-bugs at ximian.com
@@ -82,6 +82,32 @@
 Created an attachment (id=15830)
 separate test case
 ------- Additional Comments From atsushi at ximian.com  2005-09-28 15:07 -------
 Did you confirm this bug with the latest svn? I can't reproduce this bug.
+------- Additional Comments From Csaba.Halasz at gmail.com  2005-09-28 22:01 -------
+Oops,sorry I mixed up the dlls.
+I was looking at this piece of code in XslTransform.cs:
+#if NET_1_1
+	public XmlReader Transform (XPathNavigator input, XsltArgumentList
+args, XmlResolver resolver)
+		XmlReader Transform (XPathNavigator input, XsltArgumentList args,
+XmlResolver resolver)
+		{
+			// todo: is this right?
+			MemoryStream stream = new MemoryStream ();
+			Transform (input, args, new XmlTextWriter (stream, null), resolver);
+			stream.Position = 0;
+			return new XmlTextReader (stream, XmlNodeType.Element, null);
+		}
+I didn't quite see why an XmlTextWriter is used instead of delegating
+to the overload that takes a stream like this:
+Transform (input, args, stream, resolver);
+The difference is (at least) that XmlTextWriter does not output the
+xml declaration no matter what. Now I would say that is a bug, but the
+same behaviour is observed under M$ .NET. Obviously I must be missing
+something. Anyway, this bug is not a bug.

More information about the mono-bugs mailing list