|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: SELECT DISTINCT QUERY
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








