Fix a bug in the compilation of * tests.
[tatoo.git] / src / xpath / ast.ml
index 9a0d4d7..21ab5df 100644 (file)
@@ -127,8 +127,9 @@ and print_test fmt (ts,kind) =
       Text -> pp fmt "%s" "text()"
     | Element | Attribute ->
         pp fmt "%s" begin
-          if ts == star then "*"
-          else QName.to_string (QName.remove_prefix (QNameSet.choose ts))
+          if QNameSet.is_finite ts then
+            QName.to_string (QName.remove_prefix (QNameSet.choose ts))
+          else "*"
         end
     | Comment -> pp fmt "%s" "comment()"
     | ProcessingInstruction ->
@@ -181,4 +182,3 @@ let invert_axis = function
 | Preceding -> Following
 | Following -> Preceding
 ;;
-