Subject: Re: [xsl] select distinct From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 15 Dec 2000 22:10:42 -0500 |
I will mention that the elements are not all siblings. Some are, some are further down. The input looks like:
x x x y x x x y x x x x x
I'm trying to get all the x elements with distinct @type values.
<xsl:key name="typeatts" match="x" use="@type"/> ... <xsl:for-each select="//x[generate-id(.)= generate-id(key(typeatts,@type))]"> <A href="javascript:element('{@type}')"> <xsl:value-of select="@type"/> </A> </xsl:for-each>
<xsl:key name="typeatts" match="x" use="concat( generate-id(ancestor::y),' ',@type )"/>
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML services, training, libraries, products. Book: Practical Transformation Using XSLT and XPath ISBN1-894049-05-5 Article: What is XSLT? http://www.xml.com/pub/2000/08/holman Next public instructor-led training: 2001-01-27,2001-02-21, - 2001-02-27/03-01,2001-03-05/07,2001-04-06/07,2001-05-01
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] select distinct, Francis Norton | Thread | [xsl] Number of characters in docum, Evyatar_Kafkafi |
[xsl] select distinct, Richard Lander | Date | [xsl] RE: XSL-List is moving, Chris Bayes |
Month |