How to get the preceding template on the same level

Subject: How to get the preceding template on the same level
From: Frederic Schwebel <schwebel@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 5 Jun 2000 20:08:57 +0200 (MET DST)
Hello,

I'm about to finish the XSL stylesheet to translate MathML into Braille. I
still have one problem : in Braille, when there's a multiplication or
division sign, I have to ouput twice the sign if there's a fraction
before.

That mean in XSL, that when the processor sees <mo>&times;</mo> or
<mo>&divide;</mo> it must look if the precedent template ON THE SAME TREE
LEVEL is <mfrac> . The "preceding" axis doesn't work since it gives all
precedences, not only those on the same tree level...
Examples :
(2/3)*2
<mfrac>
  <mn>2</mn><mn>3</mn>
</mfrac>
<mo>&times;</mo>
<mn>2</mn>

the preceding axis would give me twice mn and one mfrac. I have no way to
know if mfrac is on the same level as &times. 
And also : (2/3)+2*3
for the preceding-axis of "*", I'd still get mfrac, but it's not the FIRST
predecessor on the same tree level so I would have to ignore it... How can
I solve this ?

Thanks in advance !
Frederic SCHWEBEL.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread