Re: [xsl] can a value of a parameter depends on a other value

Subject: Re: [xsl] can a value of a parameter depends on a other value
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 30 Nov 2011 10:47:01 +0000
On 30/11/2011 10:22, Roelof Wobben wrote:



Hello,




This script does not work

you are posting a lot of questions but not really giving anyone any clues that could enable us to help.



<xsl:with-param name="articlesperpage"> <xsl:choose> <xsl:when test=" $value = 2005-02 and $page = 1">2</xsl:when> </xsl:choose> </xsl:with-param>


I see now these error messages :



The error message clearly states that you have used xsl:with-param at a place where it is not allowed, and lists the places where it is allowed.
presumably you have used it in some other place but as you only posted the with-param and not show where it was, we can't help.


Incidentally

$value = 2005-02

is legal but tests if $value has the value 2003. If you meant to test for the string 2005-02 then you need quotes
$value = '2005-02'


XSLTProcessor::importStylesheet(): element with-param is not allowed within that context

XSLTProcessor::importStylesheet(): element choose only allowed within a template, variable or param

XSLTProcessor::importStylesheet(): xsltParseStylesheetTop: unknown with-param element

XSLTProcessor::transformToXml(): No stylesheet associated to this object


David


________________________________________________________________________ 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