This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: making grandparents of grandchildren
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 10 Jan 2002 17:14:59 -0000
- Subject: RE: [xsl] making grandparents of grandchildren
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]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