[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: "sorted" axis (was: Remove duplicates from a node-set ac

Subject: Re: "sorted" axis (was: Remove duplicates from a node-set according to content)
From: James Clark <jjc@xxxxxxxxxx>
Date: Fri, 30 Jul 1999 17:48:44 +0700
remove item from node set
Kay Michael wrote:
> 
> > From: James Clark [mailto:jjc@xxxxxxxxxx]
> >
> > The saxon:group element is a pretty interesting extension.  My initial
> > thought is why not make it an empty element that applies to its parent
> > xsl:for-each or xsl:apply-templates element, like xsl:sort?  That way
> > you can have multiple grouping levels: there would be one level of
> > xsl:item nesting per xsl:group element.
> >
> It started life as a group-by attribute on xsl:for-each when sorting was
> controlled by a similar order-by attribute. I've always been able to get by
> with one level of grouping but general nesting would be far better.
> 
> I'm not sure an empty element feels right: there's a need to delineate the
> processing that happens at each level of grouping,

Isn't that what the saxon:item does?

> something like:
> 
> process node set X sorted by Y then Z
> -- for each group with common Y do
> -- <h2>Y</h2>
> ---- for each group with common Z do
> ---- <h3>Z</h3><ul>
> ------- for each item do
> ------- <li>stuff</li>
> ------- end for
> ---- </ul>
> ---- end for
> ---<hr/>
> -- end for
> end process

Couldn't you think of it as?

for each member of (node set X sorted by Y then Z, grouped by Y then by
Z)
-- <h2>Y</h2>
---- for each member of the current group do
---- <h3>Z</h3><ul>
------- for each member of the current group do
------- <li>stuff</li>
------- end for
---- </ul>
---- end for
---<hr/>
-- end for
end for

James



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.