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]
Other format: [Raw text]

Re: count string-length without white-space and breaking if white-space exists after 126 characters



> In this case, what is better:
>
> <xsl:variable> or <xsl:param>
>
> It works with bothes, so it is a matter of taste?
>
> I truly don´t have understand yet, where the difference lies in general
> between the two elements.
Hans,

the param instruction is a way of getting in params from the outside world
into XSLT processing, they are passed via command line or if controlling
transform with JAXP or javascript or whatnot there are methods for supplying
the stylesheet with the data. In addition, params can be supplied to
named/matched templates, which is another use.

a variable instruction just holds a constant variable, both param and
variable have scoping rules, eg. if a variable is declared within a template
/ for-each then it is only scoped and thusly available within that local
scope.

I would suggest looking up both at the XSLT FAQ www.dpawson.co.uk

cheers, jim fuller




 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]