[Mono-bugs] [Bug 75789][Blo] New - Generated VB code in MSXSL:Script in XSL throws "Unrecognized Pre-Processor statement" error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 12 00:26:18 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 danielp37 at yahoo.com.

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

--- shadow/75789	2005-08-12 00:26:18.000000000 -0400
+++ shadow/75789.tmp.30706	2005-08-12 00:26:18.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 75789
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Sys.XML
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: danielp37 at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Generated VB code in MSXSL:Script in XSL throws "Unrecognized Pre-Processor statement" error 
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+When using "VB" as the language for an msxsl:script block in an XSLT 
+document, the generated class has an invalid pre-processor statement:
+(#line 3 "path/to/file")
+
+Steps to reproduce the problem:
+1. Create an XSLT with an msxsl:script block with language set to "VB".
+2. Transform the XSLT on an XML document.
+
+Actual Results:
+   Compiler Error: /tmp/92357.vb line 15 ERROR: BC29999: Unrecognized Pre-
+Processor statement
+
+Expected Results:
+   Transform works correctly.
+
+How often does this happen? 
+   Every time.
+
+Additional Information:
+
+I have traced the problem to the following code in the ScriptComilerInfo 
+class's GetScriptClass method:
+
+string lineInfoLine = 
+	li != null && li.LineNumber > 0 ?
+	String.Format (CultureInfo.InvariantCulture, "\n#line {0} \"{1}
+\"", li.LineNumber, filename) :
+	String.Empty;
+
+string source = SourceTemplate.Replace ("{0}", DateTime.Now.ToString 
+()).Replace ("{1}", classSuffix).Replace ("{2}", lineInfoLine + code);
+
+
+This code adds the #line statement to the generated class which probably 
+is a valid pre-processor statement for C# and Javascript but the mbas 
+compiler doesn't like it.


More information about the mono-bugs mailing list