Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Change a variable after declaration [Thread Next] Re: Change a variable after declarationTo: NULL Date: 6/3/2006 1:39:00 AM Jeremy Chapman wrote: > Aaaarg. That seems like a pretty bad limitation to me. XSLT is a declarative language, not a procedural language. You need to forget all about procedural methods. > Are they any work arounds? as I do a for-each I wanted to build > up a variable to use elsewhere in my transform. There are certainly ways to do this. But don't think in terms of for-each: there are usually better ways of performing an operation on a set of data. In XSLT, for-each is only used when you want to process some set of values out of normal document sequence, or if you want to process them on several occasions, or if you want to change their sort order. In normal document sequence there is an apply-templates operation which causes specified nodes to be processed. Look at the XSLT FAQ for "named templates": http://www.dpawson.co.uk/xsl/sect2/N5280.html ///Peter -- XML FAQ: http://xml.silmaril.ie/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
