This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSL variable declaration


<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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]