This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: making grandparents of grandchildren


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]