This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL variable declaration
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] XSL variable declaration
- From: cutlass <cutlass at secure0 dot com>
- Date: Fri, 23 Mar 2001 11:22:57 +0000
- References: <CA256A18.002F40FB.00@d73mta05.au.ibm.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
<xsl:variable name="test" select="some_element"/>
or
<xsl:param name="test" select=""/>
either of the 2 will serve your purposes but remember
a) use the variable in conditions where u get the value of the variable
from xml. the one constraint here is that a variable can only be set
initially and not changed ( ex. u can't increment test=test+1), its one
of the unique differences of xsl
b) use the param value when 'passsing' an external variable to your
stylesheet, the technique for this is unique to each xsl parser, goto
xsl faq for this http://www.dpawson.co.uk
to refer to that param here is an example that should work in any parser
<xsl:value-of select="$test"/>
thx for telling us the editor, but more important is 'which ' xsl parser
u are using to perform your transforms and a more detailed description
of your problem.
cheers, jim fuller
msujit@in.ibm.com wrote:
> Hi
> I'm workking with Spy XML 3.5. Can anybody tell me the syntax of declaring
> an independent variable in XSL/XML
> so that I can use it in fetching record from DB2.
>
> Sujit.
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list