X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fxpath_internal_parser.mly;h=fe38f67d41c342b450b09a5beae0eaaf96e47722;hp=de63cdf94c54d9400683e208e1a4201133cd458c;hb=7aa6c5c4e2b329bbf5fa7cc31a7542ba48ace84f;hpb=54d24e939b72601a55832aa447ed31f1b256f02e diff --git a/src/xpath/xpath_internal_parser.mly b/src/xpath/xpath_internal_parser.mly index de63cdf..fe38f67 100644 --- a/src/xpath/xpath_internal_parser.mly +++ b/src/xpath/xpath_internal_parser.mly @@ -15,7 +15,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) open Ast @@ -84,7 +84,16 @@ step: ; axis_test: - AXIS COLONCOLON test { $1, $3 } + AXIS COLONCOLON test { let a, t = $1, $3 in + if a == Attribute && Utils.QNameSet.is_finite t then + (a, Utils.QNameSet.fold + (fun t a -> + Utils.QNameSet.add + (Utils.QName.add_attribute_prefix t) a) + t Utils.QNameSet.empty) + else + (a, t) + } | test { Child, $1 } | AXIS { let _ = Format.flush_str_formatter () in