RE: [xsl] Re: . in for

Subject: RE: [xsl] Re: . in for
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sat, 5 Jan 2002 18:23:54 -0000
Jeni Tennison:
>  - I think that users of XSLT will find it confusing that they have
>    two choices for iterating over a sequence - a for expression or an
>    xsl:for-each instruction - and will unadvisedly choose to use a for
>    expression, which is not as extensible as xsl:for-each (you can't
>    add sorting, can't assign variables, can't change to applying
>    templates rather than iterating if you start with a for
>    expression).

Yes, it will be a bit confusing that there are two ways of doing it. But I
don't think you're right about the limitations of the XPath "for"
expression. You can do sorting using the new sort() function defined in XSLT
2.0, and you can switch back into XSLT (e.g. to do apply-templates) by
calling a stylesheet function.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread