- let t1 = ?< q_src><(test, is_last && not(existential))>=>
- p_f *& (if is_last then Ata.true_ else (_l dir) ** q_dst) in
- 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 t1 = ?< q_src><(test, is_last && not(ex))>=>
+ p_f *& ( if false (*is_last*) then Ata.true_ else (_l left) ** q_dst) in
+
+ let _ = add_trans num conf.tr t1 in
+
+
+ let _ = if axis=Descendant then
+ add_trans num conf.tr_aux (
+ ?< q_src><@ ((if ex||nrec then TagSet.diff TagSet.star test
+ else TagSet.star),false,
+ `True )>=> `LLeft ** q_src )
+ in
+ let t3 =
+ ?< q_src><@ ((if ex then TagSet.diff TagSet.any test
+ else TagSet.any), false, `True )>=>
+ if ex then ( Ata.atom_ `Left false q_src) *& right ** q_src
+ else (if axis=Descendant then `RRight else `Right) ** q_src
+ in
+ let _ = add_trans num conf.tr_aux t3