xsl-list
[Top] [All Lists]

Re: [xsl] Finding the first among equals using XPath

2006-06-22 10:37:58
At 11:58 AM 6/22/2006, David wrote:
xslt2's for-each-group makes it easier (or at least easier to read) but
any xslt 1 grouping construct would work here. Muenchian grouping (ie
using keys) is the usual approach, but making the keys unique in
subtrees rooted at each W is a bit tiresome, so unless you have 100's of
X below each W I'd just write it directly in XPath

something like

<xsl:for-each select="W">
  <xsl:for-each select="X[not(@Y=../following-sibling::X/@Y)]">
    something

I'd prefer this approach if you know all the X elements will be siblings.

Cheers,
Wendell


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>