[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.

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

--- 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: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ianm@activestate.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+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 =
+Assembly.GetExecutingAssembly().GetManifestResourceStream("test.xslt");
+            
+            if (xsltStream == null) {
+                throw new Exception("Missing 'test.xslt' Resource Stream");
+            }
+
+            XmlTextReader reader = new XmlTextReader(xsltStream,
+XmlNodeType.Document,null);                      
+                        
+            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
+(string,string,System.Xml.XPath.XPathNavigator,System.Security.Policy.Evidence)
+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
+(System.Xml.XPath.XPathNavigator,System.Xml.XmlResolver,System.Security.Policy.Evidence)
+in <0x00035> System.Xml.Xsl.ManagedXslTransform:Load
+(System.Xml.XPath.XPathNavigator,System.Xml.XmlResolver,System.Security.Policy.Evidence)
+in <0x00017> System.Xml.Xsl.XslTransform:Load
+(System.Xml.XPath.XPathNavigator,System.Xml.XmlResolver,System.Security.Policy.Evidence)
+in <0x00015> System.Xml.Xsl.XslTransform:Load
+(System.Xml.XPath.XPathNavigator,System.Xml.XmlResolver)
+in <0x0002a> System.Xml.Xsl.XslTransform:Load
+(System.Xml.XPath.IXPathNavigable)
+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? 
+consistently