Page 1 of 1

for-each-group

Posted: Fri Oct 14, 2011 7:47 pm
by ra0543
If I use for-each-group in the following way:

Code: Select all

<xsl:for-each-group select="collection('file:/z:/Data/Files?select=*.xml')|collection('file:/w:/?select=*.xml;recurse=yes')">
and the different files have differently named root elements (e.g. some have a root called 'box' and others have a root called 'file'), what expression should I put in the group-by attribute on this so that I group the resulting files by the name of the root element?

Re: for-each-group

Posted: Tue Oct 25, 2011 6:04 pm
by george

Code: Select all

 group-by="/*/name()" 
works ok for me.

Best Regards,
George