This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to get the preceding template on the same level
- To: xsl-list at mulberrytech dot com
- Subject: How to get the preceding template on the same level
- From: Frederic Schwebel <schwebel at handy dot univ-lyon1 dot fr>
- Date: Mon, 5 Jun 2000 20:08:57 +0200 (MET DST)
- Reply-To: xsl-list at mulberrytech dot com
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>×</mo> or
<mo>÷</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>×</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 ×.
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