[Mono-bugs] [Bug 76264][Wis] New - XslTransform throws exception with standalone output

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Sep 28 14:52:33 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 csaba.halasz at gmail.com.

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

--- shadow/76264	2005-09-28 14:52:33.000000000 -0400
+++ shadow/76264.tmp.28543	2005-09-28 14:52:33.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 76264
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: Csaba.Halasz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XslTransform throws exception with standalone output
+
+Description of Problem:
+When using the overload of XslTransform that returns an XmlReader
+an exception is thrown if the result contains an xml declaration
+with any attribute other than version and encoding.
+
+Steps to reproduce the problem:
+using System;
+using System.Xml;
+using System.Xml.Xsl;
+
+class Test
+{
+        public static void Main(string[] args)
+        {
+                XmlDocument doc = new XmlDocument();
+                doc.LoadXml (
+                    "<xsl:transform
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>" +
+                        "<xsl:output standalone='yes'/>" +
+                    "</xsl:transform>");
+                XslTransform xslt = new XslTransform();
+                xslt.Load(doc, null, null);
+                XmlReader Reader = xslt.Transform(doc,
+                    new XsltArgumentList(),
+                    new XmlUrlResolver());
+                Console.WriteLine(Reader.EOF);
+                Reader.Read();
+                Console.WriteLine(Reader.EOF);
+        }
+}
+
+Actual Results:
+Unhandled Exception: System.Xml.XmlException: expected '?' (3F) but found
+'s' (73)
+in <0x0017c> System.Xml.XmlTextReader:Expect (Int32 expected)
+in <0x00036> System.Xml.XmlTextReader:Expect (System.String expected)
+in <0x00321> System.Xml.XmlTextReader:SkipTextDeclaration ()
+in <0x00220> System.Xml.XmlTextReader:InitializeContext (System.String url,
+System.Xml.XmlParserContext context, System.IO.TextReader fragment,
+XmlNodeType fragType)
+in <0x0009c> System.Xml.XmlTextReader:.ctor (System.String url,
+System.IO.TextReader fragment, XmlNodeType fragType,
+System.Xml.XmlParserContext context)
+in <0x00065> System.Xml.XmlTextReader:.ctor (System.IO.Stream xmlFragment,
+XmlNodeType fragType, System.Xml.XmlParserContext context)
+in <0x00059> System.Xml.Xsl.XslTransform:Transform
+(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList
+args, System.Xml.XmlResolver resolver)
+in <0x00031> System.Xml.Xsl.XslTransform:Transform (IXPathNavigable input,
+System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlResolver resolver)
+in [0x0002c] (at /home/hcs/Test.cs:19) Test:Main (System.String[] args)
+
+Expected Results:
+False
+True
+
+How often does this happen? 
+Always.
+
+Additional Information:
+See bug #76115 and bug #76257


More information about the mono-bugs mailing list