Subject: Re: [xsl] XSLT1.0 distinct list of attributes across several nodes From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 26 Jun 2018 21:46:17 -0000 |
actually I think you are filtering on non-empty content rather than non-empty id so... $ xsltproc.exe hop.xsl hop.xml <?xml version="1.0"?> post_press 25 1, 2, 3, 5 post_press 26 1, 2, 3, 6 from <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="h" match="hopper[text()]" use="concat(ancestor::post_press_version/post_press_version_id, ':', @number)"/> <xsl:template match="order"> <xsl:for-each select="post_press_version"> post_press <xsl:value-of select="post_press_version_id"/> <xsl:text> </xsl:text> <xsl:for-each select=".//hopper[text()] [generate-id(.)= generate-id(key('h',concat(ancestor::post_press_version/post_press_version_id, ':', @number))[1])]"> <xsl:if test="position()!=1">, </xsl:if> <xsl:value-of select="@number"/> </xsl:for-each> </xsl:for-each> </xsl:template> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT1.0 distinct list of , David Carlisle d.p.c | Thread | Re: [xsl] XSLT1.0 distinct list of , Mark Anderson mark.a |
Re: [xsl] XSLT1.0 distinct list of , David Carlisle d.p.c | Date | Re: [xsl] XSLT1.0 distinct list of , Peter Flynn peter@xx |
Month |