|
Subject: [xsl] current() From: Jörg Heinicke <joerg.heinicke@xxxxxx> Date: Tue, 27 Nov 2001 23:04:15 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Getting rid of leading ze, Chuck White | Thread | RE: [xsl] current(), Michael Kay |
| Re: [xsl] Netscape changes font-siz, Thomas B. Passin | Date | [xsl] Re: current(), Jörg Heinicke |
| Month |