[Mono-bugs] [Bug 70821][Wis] New - XslTransform.Load fails with inline script if loaded from a stream

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 27 Dec 2004 05:25:10 -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 ianm@activestate.com.


--- shadow/70821	2004-12-27 05:25:09.000000000 -0500
+++ shadow/70821.tmp.26120	2004-12-27 05:25:10.000000000 -0500
@@ -0,0 +1,77 @@
+Bug#: 70821
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ianm@activestate.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: XslTransform.Load fails with inline script if loaded from a stream
+Description of Problem:
+Steps to reproduce the problem:
+1.compile the following code:
+Stream xsltStream =
+            if (xsltStream == null) {
+                throw new Exception("Missing 'test.xslt' Resource Stream");
+            }
+            XmlTextReader reader = new XmlTextReader(xsltStream,
+            XmlDocument xsltDoc = new XmlDocument();
+           	xsltDoc.Load(reader);
+            XslTransform transform = new XslTransform();
+            transform.Load(xsltDoc);
+with a sample test.xslt and then run the resulting exe.
+Actual Results:
+Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
+Parameter name: uriString
+in <0x0004e> System.Uri:Parse (string)
+in <0x00048> (wrapper remoting-invoke-with-check) System.Uri:Parse (string)
+in <0x00017> System.Uri:Parse ()
+in <0x0007f> System.Uri:.ctor (string,bool)
+in <0x0000f> System.Uri:.ctor (string)
+in <0x0002c> (wrapper remoting-invoke-with-check) System.Uri:.ctor (string)
+in <0x000ff> Mono.Xml.Xsl.ScriptCompilerInfo:GetScriptClass
+in <0x000b3> MSXslScript:Compile ()
+in <0x000f6> Mono.Xml.Xsl.MSXslScriptManager:AddScript (Mono.Xml.Xsl.Compiler)
+in <0x003e2> Mono.Xml.Xsl.XslStylesheet:HandleTopLevelElement ()
+in <0x0004d> Mono.Xml.Xsl.XslStylesheet:ProcessTopLevelElements ()
+in <0x0047d> Mono.Xml.Xsl.XslStylesheet:.ctor (Mono.Xml.Xsl.Compiler)
+in <0x00197> Mono.Xml.Xsl.Compiler:Compile
+in <0x00035> System.Xml.Xsl.ManagedXslTransform:Load
+in <0x00017> System.Xml.Xsl.XslTransform:Load
+in <0x00015> System.Xml.Xsl.XslTransform:Load
+in <0x0002a> System.Xml.Xsl.XslTransform:Load
+in <0x000cb> Class1:TestXsltLoad ()
+in <0x00007> Class1:Main (string[])
+Expected Results:
+It should just Load the xslt without failure. This code works on ms .Net
+and the latest 1.0 mono release.
+How often does this happen?