[Mono-bugs] [Bug 76530][Nor] Changed - Problem with null namespaces
using XSLT (testcase)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Oct 24 02:26:15 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 atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76530
--- shadow/76530 2005-10-23 23:17:36.000000000 -0400
+++ shadow/76530.tmp.15139 2005-10-24 02:26:15.000000000 -0400
@@ -55,6 +55,41 @@
------- Additional Comments From knocte at gmail.com 2005-10-23 23:13 -------
Created an attachment (id=15973)
Expected results: the results from the MS.NET framework
+
+------- Additional Comments From atsushi at ximian.com 2005-10-24 02:26 -------
+Simplified repro:
+
+using System;
+using System.IO;
+using System.Xml;
+using System.Xml.XPath;
+using System.Xml.Xsl;
+
+public class Test
+{
+ public static void Main ()
+ {
+ string xsl = @"<xsl:stylesheet
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'
+xmlns='urn:foo'>
+<xsl:template match='/*'>
+ <xsl:element name='{local-name()}' />
+</xsl:template>
+</xsl:stylesheet>";
+ string xml = "<root/>";
+ XslTransform t = new XslTransform ();
+ t.Load (new XPathDocument (new StringReader (xsl)));
+ StringWriter sw = new StringWriter ();
+ XmlTextWriter xw = new XmlTextWriter (sw);
+ t.Transform (new XPathDocument (new StringReader
+(xml)), null, xw);
+ Console.WriteLine (sw);
+ }
+}
+
+expected: <root xmlns="urn:foo" />
+actual: <root />
+
More information about the mono-bugs
mailing list