[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Including an attribute discriminator in the for-each-
I have two elements that differ only by attribute. My for-each-group code
currently considers them to be identical, so I need to distinguish them by
their attributes as well as their text node. I do not know enough about
XPath yet to construct a proper current-grouping-key(). (I'm reading Michael
Kay's 4th edition, but have not covered the XPath section yet). Everything I
have tried with | @* has failed.
The two elements that need to be distinguished are: <Heading entry="author">Hahn, Henry</Heading> <Heading entry="subject">Hahn, Henry</Heading> The code snippet is: <xsl:for-each-group select="Item" group-by="Heading" collation="{$sorting-collation}"> <xsl:sort select="current-grouping-key()" collation="{$sorting-collation}"/> Thanks, Mark
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|