[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] SELECT DISTINCT QUERY
Subject: RE: [xsl] SELECT DISTINCT QUERY From: "Martin Rowlinson \(MarrowSoft\)" <marrow@xxxxxxxxxxxxxx> Date: Sat, 24 May 2003 08:43:38 +0100 |
Hi Onur, You can use the Muenchian technique - the only slight addition will be that you will probably need to place the additional filtering into the <xsl:key>, i.e. your key will reference both the @name (for which you want to find distinct values) and the @date (on which you want to filter). Something like... <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:key name="kDistinctDateName" match="person" use="concat(@date,'|',@name)"/> <xsl:param name="today" select="'5/23/2003'"/> <xsl:template match="salesStaff"> <result> <xsl:copy-of select="person[generate-id() = generate-id(key('kDistinctDateName',concat($today,'|',@name)))]"/> </result> </xsl:template> </xsl:stylesheet> Hope this helps Marrow http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger) http://www.topxml.com/Xselerator XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] SELECT DISTINCT QUERY, Onur Esnaf | Thread | [xsl] Total PAGE number, Marco Pedrini |
[xsl] SELECT DISTINCT QUERY, Onur Esnaf | Date | Re: [xsl] looping through result tr, Wendell Piez |
Month |