[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] current()
Hi, I have a problem with unique nodes by using preceding-sibling-axis and the current()-function. My XML: <cluster> <inst machine="test1.virbus.de" inst-src="srctest"/> <inst machine="test2.virbus.de" inst-src="srctest2"/> <inst machine="test3.virbus.de" inst-src="srctest"/> </cluster> My XSL: <xsl:template match="cluster"> <xsl:apply-templates select="inst[not(preceding-sibling::inst[@inst-src=current()/@inst-src])]"/> </xsl:template> <xsl:template match="inst"> <target> <name><xsl:value-of select="@inst-src"/></name> <xsl:for-each select=".|following-sibling::inst[@inst-src=current()/@inst-src]"> <depends><xsl:value-of select="concat(@machine,'::',@inst-src)"/></depends> </xsl:for-each> </target> </xsl:template> What's wrong with 'inst[not(preceding-sibling::inst[@inst-src=current()/@inst-src])]'? The only thing I can imagine is the current()-function. Shouldn't it relate to the inst, I'm testing on for applying? The above stylesheet is working with Xalan 2.2.D9, but not with the later versions. I want to know which is the correct behaviour. With MSXML 4 it doesn't work too. Regards, Joerg 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
|