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

Re: can a value of a parameter depends on a other valu

Subject: Re: can a value of a parameter depends on a other value
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 02 Dec 2011 09:18:14 +0000
Re:  can a value of a parameter depends on a other valu
On 02/12/2011 08:02, Roelof Wobben wrote:
<xsl:when test="$page='1'">number(1+$page*2)</xsl:when>

the content of xsl:when is like the content of any other part of the template just copied to the output as text or literal result elements.
If you want to evaluate an xpath you need to put it in a select expression, in a xsl:value-of most likely, in XSLT 1


<xsl:when test="$page='1'"><xsl:value-of select="1+$page*2"/></xsl:when>

There is still no evidence that you actually need any variables at all.
Do you really need to pass any parameter to your template? the $page parameter is in scope for the entire stylesheet so you could just use
1+$page*2 at whatever point you need that number, and avoid all the
complication.


David

--
google plus: https:/profiles.google.com/d.p.carlisle

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________


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.