RE: [xsl] making grandparents of grandchildren

Subject: RE: [xsl] making grandparents of grandchildren
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 10 Jan 2002 17:14:59 -0000
Learn about grouping in XSLT at http://www.jenitennison.com/xslt/grouping.

Or use the new XSLT 2.0 grouping facilities available in Saxon 7.0:

<xsl:for-each-group select="//owner" group-by=".">
  <ownergroup owner="{.}">
  <xsl:copy-of select="current-group()/parent::picture"/>
  </ownergroup>
</xsl:for-each-group>

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of 
> Piotr Kopszak
> Sent: 10 January 2002 14:29
> To: xsl-list
> Subject: [xsl] making grandparents of grandchildren
> 
> 
> Dear listmembers, 
> 
> Beg your pardon for my ignorance. Just starting to deal with XSLT. 
> I have to transform a list pictures grouped by their authors into
> another list grouped by their owners. This would probably make a good
> tutorial example. 
> 
> The structure of the first list is 
> 
> <authorgroup>
> <name></name>
> <picture>
> <title></title>
> <owner></owner>
> <inv></inv>
> </picture>
> <picture>
> ...
> </picture>
> </authorgroup> 
> <authorgroup>
> ...
> </authorgroup>
> 
> 
> What I tried for some time to achieve in vain, is group paintings
> belonging to same owners under their names sorted and add author names
> to each picture in the list. Would really appreciate your help (or our
> exhibition in Madrid will have to be postponed :).
> 
> Best wishes
> 
> Piotr
>  
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread