Hi,
Ich habe folgende Frage: wie kann ich jeweils den vorletzten Wert eines ausgegebenen Elements unterstreichen, um ihn von dem Summenwert in der letzten Zeile abzugrenzen? Kurz etwas deutlicher: ich habe folgende Ausgabe:
Die XML-Datei sieht so aus (Auszug):
...
<catgry>
<catValu>1</catValu>
<txt>Ja</txt>
<catStat type="freq">1585</catStat>
<catStat type="percent">81.12</catStat>
</catgry>
<catgry>
<catValu>2</catValu>
<txt>Weiß nicht</txt>
<catStat type="freq">212</catStat>
<catStat type="percent">10.85</catStat>
</catgry>
<catgry>
<catValu>3</catValu>
<txt>Nein</txt>
<catStat type="freq">157</catStat>
<catStat type="percent">8.03</catStat>
</catgry>
<catgry>
<catStat type="freq">1954</catStat>
<catStat type="percent">100.00</catStat>
</catgry>
...
Folgendes habe ich schon ausprobiert, leider ohne Erfolg.
<xsl:if test="catStat[@type='freq'][position()=last()-1]"><hr/></xsl:if>
in dem Template, daß die catStat - Elemente bearbeitet:
<xsl:if test="position()=(last()-1)"><hr/></xsl:if>
Hängt aber auch davon ab, wie Dein XSL insgesamt aufgebaut ist.
Andreas