[XSL-LIST Mailing List Archive Home]
Re: alternating tags in a list?
--- Guy Murphy wrote: ---
> So you don't need to track state, just obtain index, evaluate a
> and perform basic arithmetic. You could do this without resorting to
> script, but it would probably be more concise with script. It would IMHO
> a pity not to include script for these matters as it would mean bending
> simple XSL out of shape to occomodate these rare occurences. Such matters
> are best expressed in a procedural language sniper, ie. a piece of
> I've used this method many times when transforming data to HTML via ASP.
> Personaly, if W3C doesn't include ECMAScript support in the final Rec
> be using the non-compliant variety of parser that does :)
I strongly agree! When the original XSL proposal came out I was using
XSL to create tables with alternating colors for each row by embedding
ECMAScript. Sadly, the latest XSL does not permit this. Fortunately,
Microsoft realized the usefulness of this in MSIE5b2.
I would not propose to add basic arithmetic or evaluation of
conditions to XSL, since it can be done quite elegantly now with
ECMAScript. So I'll join you in pleading for ECMAScript support in the
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list