xsl-list
[Top] [All Lists]

Re: [xsl] Is xsl:for-each "syntactic sugar"?

2010-05-07 08:32:13
On 07/05/2010 14:17, Florent Georges wrote:
David Carlisle wrote:

   Hi,

Not "many", all uses of for-each can be equivalently handled by
apply-templates.

   For nodes, not for atomic items, of course.

ah yes there is that:-) strange how after using xslt 2 for years you can still automatically drop back to giving xslt 1 answers;-)


<xsl:template match="/|node()" mode="unique-id">

   I guess you meant match="@*|node()" ;-)

well I meant to add / (as it isn't matched by node() as it's not a child, but of course I should have added @* (and I thought but didn't mention as it would spoil a good argument, that you also need namespace() but that's not allowed in patterns) so "except for atomic values and namespace nodes" needs inserting somewhere in my original waffle.


   Regards,


David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--