X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fast.ml;h=5b322a4af56a28c2d01c596756820aaa7ee4f128;hp=9a0d4d72811b489c697be0aa7adb1357b4f4ef7b;hb=fe2ba1820282783ae8c10fbbbd2b65d3dc4c67f2;hpb=fa7e819743a4a6d008ec086dfdeb2e30df2da701 diff --git a/src/xpath/ast.ml b/src/xpath/ast.ml index 9a0d4d7..5b322a4 100644 --- a/src/xpath/ast.ml +++ b/src/xpath/ast.ml @@ -127,15 +127,16 @@ 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 (QNameSet.choose ts) + else "*" end | Comment -> pp fmt "%s" "comment()" | ProcessingInstruction -> pp fmt "processing-instruction(%s)" begin if ts == star then "" - else "\"" ^ (QName.to_string (QName.remove_prefix (QNameSet.choose ts))) ^ "\"" + else "\"" ^ (QName.to_string (QNameSet.choose ts)) ^ "\"" end | Node -> pp fmt "%s" "node()" | Document -> pp fmt "%s" "" @@ -181,4 +182,3 @@ let invert_axis = function | Preceding -> Following | Following -> Preceding ;; -