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

RE: several questions on XML to HTML processing with XSL

Subject: RE: several questions on XML to HTML processing with XSL
From: H.vanderLinden@xxxxxxxxxxxxx
Date: Tue, 13 Jun 2000 09:56:48 +0200
RE: several questions on XML to HTML processing with XSL
Hello,

> From: Kay Michael <Michael.Kay@xxxxxxx>
> Date: Fri, 9 Jun 2000 15:50:14 +0100 
>> 4. How do I declare a variable parametername?
>> 
>> I'd like to do the following, but Saxon returns an errormessage on the
>> <xsl:with-param> line (invalid $ character).
>> 
>> <xsl:variable 
>> name="ParamName">someXMLtag/@someAttribute</xsl:variable>
>> 
>> <xsl:call-template name="SomeTemplateName">
>>    <xsl:with-param name="$ParamName">whateverValue</xsl:with-param>
>> </xsl:call-template>
>> 
>> How should I do this?

>Leave out the "$" sign. It's not part of the parameter's name, it's only
>used to identify a variable when used within an XPath expression.


Sorry, I left something out. The template 'SomeTemplateName' has several
parameters which I initialised to
a default value and I only want to set one to a different value, but this
one parameter can be variable.

So it's something like this:

<xsl:template name="SomeTemplateName">
<xsl:param name="param1">true</xsl:param> 
<xsl:param name="param2">true</xsl:param>
<xsl:param name="param3">true</xsl:param>
<xsl:param name="param4">true</xsl:param>

<!-- do some processing here based on the value of the parameters -->

</xsl:template>

the variable "ParamName" will be either "param1", "param2" etc. and
'whateverValue' could be e.g. 'false'.

So instead of passing on the value of all parameters I just want to pass on
the only parameter that's changed.

I vaguely recall that someone has once asked a similar question, but I can't
find it in the archives.

Bye,

Helma van der Linden
Medical Informatics
h.vanderlinden@xxxxxxxxxxxxx 


 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.