Fix a bug in the handling of processing-instruction() test.
[tatoo.git] / src / xpath / xpath_internal_parser.mly
index 72a07fb..a40eea9 100644 (file)
@@ -15,7 +15,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-13 12:11:04 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-13 12:38:54 CET by Kim Nguyen>
 *)
 
   open Ast
@@ -136,10 +136,11 @@ test:
 | COMMENT             { Utils.QNameSet.singleton(Utils.QName.comment),
                         NodeKind.Comment
                       }
-| PI                  { Utils.QNameSet.singleton(
-                              Utils.QName.processing_instruction (
-                                Utils.QName.of_string $1)
-                         ), NodeKind.ProcessingInstruction
+| PI                  { (if $1 = "" then star
+                         else Utils.QNameSet.singleton(
+                           Utils.QName.processing_instruction (
+                             Utils.QName.of_string $1)
+                         )), NodeKind.ProcessingInstruction
                       }
 | TAG                 { Utils.QNameSet.singleton(Utils.QName.of_string $1),
                         NodeKind.Element