|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Testing for presence of node, etc.
Hello Joel,
you can easily describe it as "grouping problem" ;-) And there is a easy method to solve such problems: Muenchian Method (http://www.jenitennison.com/xslt/grouping/muenchian.xml). <xsl:key name="links" match="link" use="@type"/> <xsl:template match="root"> <xsl:apply-templates select="link[count(. | key('links', @type)[1]) = 1]" mode="unique"/> </xsl:template> <!-- first occurence of a link with a specific type" -->
<xsl:template match="link" mode="unique">
type: <xsl:value-of select="@type"/>
<xsl:apply-templates select="key('links', @type)"/>
</xsl:template><xsl:template match="link"> <xsl:value-of select="@url"/> </xsl:template> Regards, Joerg Joel Konkle-Parker schrieb: -----BEGIN PGP SIGNED MESSAGE----- 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








