Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2006, 02:47 AM
Authorized User
 
Join Date: Dec 2005
Posts: 71
Thanks: 10
Thanked 0 Times in 0 Posts
Default Clarification require on use - xsl:for-each-group

Hi All,

I am using Saxonb8.6 the latest version which supplies an error message as follows.

Following is XSL file.

<xsl:template match="*">
 <xsl:copy>
  <xsl:for-each-group group-adjacent="self::procplace or self::proctopic">
    <xsl:choose>
      <xsl:when test="current-grouping-key()">
        <meeting>
          <xsl:apply-templates select="current-group()"/>
        </meeting>
      </xsl:when>
         <xsl:otherwise>
         <xsl:apply-templates select="current-group()"/>
         </xsl:otherwise>
   </xsl:choose>
   </xsl:for-each-group>
  </xsl:copy>
</xsl:template>


Error at xsl:for-each-group on line 14 of file:/C:/box/axe.xsl:
  XTSE0010: Element must have a "select" attribute

Warning: on line 14 of file:/C:/box/axe.xsl:
  The self axis will never select any ** error ** nodes when starting at a element() node
Warning: on line 14 of file:/C:/box/axe.xsl:

  The self axis will never select any ** error ** nodes when starting at a element() node

I would greatly appreciate any help provided.

Thanks & Regards,
- ROCXY



__________________
Thanks,
Rocxy.
 
Old January 2nd, 2006, 05:33 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

The select attribute of xsl:for-each-group says which nodes you want to group. In this case it's the children of the context node, so select="child::node()".

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Xsl: strip-space elements; and 'group-adjacent' ROCXY XSLT 6 July 15th, 2010 08:59 AM
XSL group/sort by date problem athos XSLT 4 October 7th, 2008 09:35 AM
xsl clarification... rajesh_css XSLT 1 October 2nd, 2008 01:56 AM
How to group xsl elements in xslt.10 suji XSLT 1 February 29th, 2008 03:44 AM
xsl:for-each-group Questions kwilliams XSLT 6 July 25th, 2005 04:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.