|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: distinct values
> Is there a solution that works in the Microsoft implementation? don't know. > Is there a way to do this in the current draft without using variables? why no variables? Anyway this solution uses one variable and produces bash-2.01$ xt u.xml ns.xsl [[nodeA]] [[nodeB]] [[nodeC]] [[nodeD]] bash-2.01$ on your sample input. David <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" result-ns=""> <xsl:template match="root"> <xsl:apply-templates select="*"/> </xsl:template> <xsl:template match="*"> <xsl:variable name="x" expr="qname(.)"/> <xsl:if test="not(from-preceding-siblings(*[qname(.)=$x]))"> [[<xsl:value-of select="qname(.)"/>]] </xsl:if> </xsl:template> </xsl:stylesheet> 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








