This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
last() or preceding node if last() have empty text-node selection
- From: "Braumüller, Hans" <h dot braumueller at hanseorga dot de>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 24 May 2002 11:56:20 +0200
- Subject: [xsl] last() or preceding node if last() have empty text-node selection
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello friends,
i encounter some small problem and i don´t have find a solution.
I want to select the string from the last position, but if it is empty, then
i want select, the preceding text-node DARBEDINGUNG.laufzeitbis, here
20.10.2002
xml-source snippet:
<DARBEDINGUNG num="0">
<DARBEDINGUNG.laufzeitbis>20.10.2002</DARBEDINGUNG.laufzeitbis>
</DARBEDINGUNG>
<DARBEDINGUNG DARBEDINGUNG="select" num="1">
<DARBEDINGUNG.laufzeitbis></DARBEDINGUNG.laufzeitbis>
</DARBEDINGUNG>
i am trying following:
<xsl:if test="//DARBEDINGUNG[last()]/DARBEDINGUNG.laufzeitbis != '' ">
<xsl:value-of
select="//DARBEDINGUNG[last()]/DARBEDINGUNG.laufzeitbis"/>
</xsl:if>
Obviously it does not work!
Please excuse my simpe newbie question.
Thanks,
Hans Braumüller
-- + --
Networking Artist
http://crosses.net
http://kunstserie.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list