You could use
<xsl:copy-of select="$text-1[current()/textNo='text-1']"/>
but people might question whether it's an improvement on your original.
Small is not always beautiful.
In XSLT 2.0 you can do
<xsl:copy-of select="if (textNo='text-1') then $text-1 else ()"/>
Michael
-----Original Message-----
From: Christian Haase [mailto:haase(_at_)siteface(_dot_)de]
Sent: 16 May 2006 22:40
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Need help for XSL beautifaction
Hi all!
Do you have any ideas how I can code this XSL more beautiful:
<xsl:if test="textNo = 'text-1'" >
<xsl:copy-of select="$text-1"/>
</xsl:if>
In other words: Is there a chance to use the <copy-of>
directly with the value of "textNo", without the <xsl:if> ?
Greetings,
Christian
-------------------------------------
Christian Haase, Hans-Mertens-Str. 37
30655 Hannover, GERMANY
Tel: +49-511-697916 / +49-178-7772617
Fax: +49-511-3948280
ICQ: 307628315
-------------------------------------
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--