Hi, I am trying to group some child nodes but having a problem. I want to group all children nodes of <prelreqs> except if the child node name is <safety>. Then I want to process those children as a group.
When I use the below for-each-group construct, I get an error with Saxon 9.1.0.7
Code:
<xsl:for-each-group select="prelreqs" group-by="child::*[not(name(.) = 'safety')]">
<xsl:sort select="current-grouping-key()"/>
<xsl:for-each select="current-grouping-key()">
<!--do something-->
</xsl:for-each>
</xsl:for-each-group>
error:
Code:
XPTY0004: Required item type of first argument of name() is node(); supplied value has
item type xs:anyAtomicType
The error is thrown on this line:
Code:
<xsl:for-each select="current-grouping-key()">
Thanks.