[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Need help for XSL beautifaction

Subject: RE: Need help for XSL beautifaction
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 17 May 2006 12:38:17 +0100
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 ()"/>


> -----Original Message-----
> From: Christian Haase [mailto:haase@xxxxxxxxxxx] 
> Sent: 16 May 2006 22:40
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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
> -------------------------------------

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.