This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to get the preceding template on the same level



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]