- let t2 = ?< q_src><(TagSet.star, false)>=>
- (if axis=Descendant then `Left ** q_src +|`Right ** q_src
- else `Right ** q_src) in
- let tsa = ?< q_src><(att_or_str, false)>=> `Right ** q_src
+
+ let _ = add_trans num conf.tr t1 in
+
+
+ let _ = if axis=Descendant then
+ add_trans num conf.tr_aux (
+ ?< q_src><@ ((if ex then TagSet.diff TagSet.star test
+ else TagSet.star),false,
+ if TagSet.is_finite test
+ then `Left(fun t ->
+ if (Tree.Binary.is_node t)
+ then
+ let mytag = Tree.Binary.tag t in
+ TagSet.exists (fun tag ->
+ tag == mytag ||
+ Tree.Binary.has_tagged_desc t tag
+ )
+ test
+ else true
+ )
+
+ else `True )>=> `Left ** q_src )
+ in
+ let t3 =
+ ?< q_src><@ ((if ex then TagSet.diff TagSet.any test
+ else TagSet.any), false,
+ if axis=Descendant&&TagSet.is_finite test
+ then `True (*`Right(fun t ->
+ TagSet.exists (fun tag -> Tree.Binary.has_tagged_foll t tag)
+ test) *)
+ else `True )>=> `Right ** q_src
+ in
+ let _ = add_trans num conf.tr_aux t3