xsl-list
[Top] [All Lists]

Re: XSLT Grouping/Filtering issue with preceding/following axes

2005-08-05 07:59:48
Tempore 16:51:16, die 08/05/2005 AD, hinc in 
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Jacquo Johnson 
<genxgeek(_at_)gmail(_dot_)com>:

   <!-- This doesn't work...group is not filtered correctly -->
   <xsl:variable name="uh" select="//Record[CodeId='FRED']"/>
   <xsl:element name="Copy">
       <xsl:copy-of select="$uh"/>
    </xsl:element>
    <xsl:element name="Filter">
       <xsl:copy-of 
select="$uh[(not(AttributeName=preceding::*/AttributeName)]"/>
    </xsl:element>

There's a typo in the Xpath. It should be
$uh[not(AttributeName=preceding::*/AttributeName)]

It more common to use the Muenchian grouping technique for solving problems 
like this.

regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
«Φιλήκοον ειναι μαλλον η φιλόλαλον»  - Κλεόβουλος

--~------------------------------------------------------------------
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>
--~--