[Mono-bugs] [Bug 47854][Maj] New - Xsl broken when loading from a XmlDocument or XmlTextReader

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 24 Aug 2003 14:27:47 -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 gonzalo@ximian.com.

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

--- shadow/47854	2003-08-24 14:27:46.000000000 -0400
+++ shadow/47854.tmp.2281	2003-08-24 14:27:47.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 47854
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Xsl broken when loading from a XmlDocument or XmlTextReader
+
+Get the attachments, compile and run this program:
+---
+using System;
+using System.Xml;
+using System.Xml.Xsl;
+
+public class Test
+{
+	static void Main ()
+	{
+		XslTransform tr = new XslTransform ();
+		XmlDocument doc = new XmlDocument ();
+		doc.Load ("nunit2.xsl");
+		tr.Load (doc);
+		doc = new XmlDocument ();
+		doc.Load ("nunit2.xml");
+		tr.Transform (doc, null, Console.Out);
+	}
+}
+---
+
+Output:
+Unhandled Exception: System.Xml.XmlException: No style sheet!
+in <0x00081> 00 System.Xml.Xsl.UnmanagedXslTransform:ApplyStylesheet
+(intptr,string[],System.Collections.Hashtable)
+
+Expected:
+Tests.System.ArrayTest.TestCopyTo : #E68in <0x00534> 00
+MonoTests.System.ArrayTest:TestCopyTo ()
+in (unmanaged) mono [0x809c4f3]
+in (unmanaged) mono(mono_runtime_invoke+0x27) [0x80ba123]
+in (unmanaged) mono(mono_runtime_invoke_array+0x174) [0x80bac16]
+in (unmanaged) mono [0x80bfa2f]
+in <0x000aa> 00 System.Reflection.MonoMethod:Invoke
+(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
+
+
+Additional information:
+if instead of
+	doc.Load ("nunit2.xsl");
+	tr.Load (doc);
+
+I do: tr.Load ("nunit2.xsl");
+
+it works as it always did.