[Mono-bugs] [Bug 41976][Nor] Changed - XPath fails when the node to match is called "namespace"

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 27 Apr 2003 00:05:01 -0400 (EDT)


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 miguel@ximian.com.

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

--- shadow/41976	Sat Apr 26 23:58:23 2003
+++ shadow/41976.tmp.31487	Sun Apr 27 00:05:01 2003
@@ -1,14 +1,14 @@
 Bug#: 41976
 Product: Mono/Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: System.XML
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: miguel@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -50,6 +50,45 @@
 
 And compile and run like this:
 csc test.cs
 mono test.exe test.xml
 
 The problem seems to be with the word "namespace"
+
+------- Additional Comments From miguel@ximian.com  2003-04-27 00:05 -------
+Patch:
+
+Index: System.Xml.XPath/Parser.jay
+===================================================================
+RCS file: /cvs/public/mcs/class/System.XML/System.Xml.XPath/Parser.jay,v
+retrieving revision 1.9
+diff -u -r1.9 Parser.jay
+--- System.Xml.XPath/Parser.jay 4 Feb 2003 16:06:11 -0000       1.9
++++ System.Xml.XPath/Parser.jay 27 Apr 2003 04:12:47 -0000
+@@ -405,6 +405,10 @@
+        {
+                $$ = new QName ((String) $1, (String) $3);
+        }
++       | NCName COLON NAMESPACE
++       {
++               $$ = new QName ((String) $1, "namespace");
++       }
+        ;
+ 
+ %%
+Index: System.Xml.XPath/ChangeLog
+===================================================================
+RCS file: /cvs/public/mcs/class/System.XML/System.Xml.XPath/ChangeLog,v
+retrieving revision 1.33
+diff -u -r1.33 ChangeLog
+--- System.Xml.XPath/ChangeLog  7 Apr 2003 11:15:36 -0000       1.33
++++ System.Xml.XPath/ChangeLog  27 Apr 2003 04:12:47 -0000
+@@ -1,3 +1,8 @@
++2003-04-27  Miguel de Icaza  <miguel@ximian.com>
++
++       * Parser.jay: Add a rule "NCName COLON NAMESPACE" that turns it
++       into a QName with the "namespace" string attached.
++
+ 2003-03-07  Piers Haken  <piersh@friskit.com>
+ 
+        * Tokenizer.cs: allow '.'s in NCNames
+