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

RE: Re:

Subject: RE: Re:
From: Hervé Covemaeker <herve.covemaeker@xxxxxxxxxxxxx>
Date: Thu, 14 Mar 2002 18:11:51 +0100
covemaeker
thanx, i works.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Joerg
Heinicke
Sent: Thursday, March 14, 2002 5:54 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re:


It's possible with string-manipulation:

<xsl:when test="translate(string($sortBy),'-','') = '1'">

But why not easily:

<xsl:when test="$sortBy=1">-1</xsl:when>
<xsl:otherwise>1</xsl:otherwise>

Regards,

Joerg

Hervé Covemaeker wrote:
> Hi all,
>
> I hope you can help. i wonder if there is a function in xsl that does the
> same as ABS(). So it has to look
> for the absolute value of a variable.
>
> I would like to do this:
>
> <xsl:attribute name="href">showGroup.jsp?sortBy=<xsl:choose>
> 	<xsl:when test="($sortBy=1) or ($sortBy=-1)">
> 		<xsl:value-of select="-$sortBy"/>
> 	</xsl:when>
> 	<xsl:otherwise>
> 		1
> 	</xsl:otherwise>
> 	</xsl:choose>
> </xsl:attribute>
>  i would like to replace "<xsl:when test="($sortBy=1) or ($sortBy=-1)">"
> with something like this:
> <xsl:when test="abs($sortBy)">
>
> Is this possible?
>
> Thnx
>
> Hervé
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


--

System Development
VIRBUS AG
Fon  +49(0)341-979-7411
Fax  +49(0)341-979-7409
joerg.heinicke@xxxxxxxxx
www.virbus.de


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.