[Mono-bugs] [Bug 56070][Nor] New - msxsl:script block cannot be compiled when stylesheet has empty BaseURI.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 26 Mar 2004 07:56:56 -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 gert.driesen@pandora.be.

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

--- shadow/56070	2004-03-26 07:56:56.000000000 -0500
+++ shadow/56070.tmp.24796	2004-03-26 07:56:56.000000000 -0500
@@ -0,0 +1,46 @@
+Bug#: 56070
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+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: msxsl:script block cannot be compiled when stylesheet has empty BaseURI.
+
+The following exception is thrown when the stylesheet containing the
+<msxsl:script> has an empty BaseURI :
+
+System.Xml.Xsl.XsltCompileException : Stylesheet script compile error:
+ 
+/tmp/17343.cs line 4 ERROR: CS1576: Argument to #line directive is missing
+or invalid
+ line 0 ERROR: failed: 1 error(s), 0 warnings  line 4, position 9
+in <0x00575> Mono.Xml.Xsl.ScriptCompilerInfo:GetScriptClass
+(string,string,System.Xml.XPath.XPathNavigator,System.Security.Policy.Evidence)
+....
+
+The exception itself is caused by a bug in mcs, as mcs fails to compile a
+#line directive with an empty filename 
+
+eg. #line 300 ""
+
+(I'll file a separate bug report for this in a minute)
+
+But even without the bug in mcs, I assume it would be better if
+ScriptCompilerInfo.GetScriptClass should be patched to no longer add an
+empty filename argument to the line directive if scriptNode has an empty
+BaseURI.  Or not ?
+
+I'll attach a testcase for this issue. I would appreciate it if someone
+would commit this to cvs.  I wasn't sure in which existing test class this
+test should be added, so I just created a new test class.  Feel free to add
+the test to another existing test class.