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 [EMAIL PROTECTED]

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

--- shadow/76530        2005-10-24 02:26:15.000000000 -0400
+++ shadow/76530.tmp.15521      2005-10-24 02:59:20.000000000 -0400
@@ -90,6 +90,45 @@
         }
 }
 
 expected: <root xmlns="urn:foo" />
 actual: <root />
 
+
+------- Additional Comments From [EMAIL PROTECTED]  2005-10-24 02:59 -------
+Actually I have a fix for the simplified repro above, but not for this
+bug itself. Here is another repro. Replace "xsl" and "xml" in the
+above simplified repro with:
+
+       string xsl = @"<xsl:stylesheet version='1.0'
+  xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns='urn:foo'>
+  <xsl:template match='/*'>
+      <root>
+    <xsl:element name='{local-name()}' />
+      </root>
+  </xsl:template>
+</xsl:stylesheet>";
+
+       string xml = "<page/>";
+
+expected: <root xmlns="urn:foo"><page /></root>
+actual: <root xmlns="urn:foo"><page xmlns="" /></root>
+
+
+Index: Mono.Xml.Xsl/Compiler.cs
+===================================================================
+--- Mono.Xml.Xsl/Compiler.cs   (revision 52109)
++++ Mono.Xml.Xsl/Compiler.cs   (working copy)
+@@ -842,8 +842,9 @@
+                       if (colon > 0)
+                               return new QName (name.Substring (colon + 1), 
nsDecls
+[name.Substring (0, colon)] as string);
+                       else if (colon < 0)
+-                              // Default namespace is not used for unprefixed 
names.
+-                              return new QName (name, "");
++                              return new QName (name,
++                                      nsDecls.ContainsKey (String.Empty) ?
++                                      (string) nsDecls [String.Empty] : 
String.Empty);
+                       else
+                               throw new ArgumentException ("Invalid name: " + 
name);
+               }
+
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to