[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: current()

Subject: Re: current()
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 27 Nov 2001 23:07:54 +0100
 Re: current()
I forgot the outputs:

Xalan 2.2.D9 - the 'working' version, I expect this output:

<target>
<name>srctest</name>
<depends>test1.virbus.de::srctest</depends>
<depends>test3.virbus.de::srctest</depends>
</target>
<target>
<name>srctest2</name>
<depends>test2.virbus.de::srctest2</depends>
</target>

Xalan 2.2.D13:

<target>
<name>srctest</name>
<depends>test1.virbus.de::srctest</depends>
<depends>test3.virbus.de::srctest</depends>
</target>
<target>
<name>srctest2</name>
<depends>test2.virbus.de::srctest2</depends>
</target>
<target>
<name>srctest</name>
<depends>test3.virbus.de::srctest</depends>
</target>

Regards,

Joerg


> 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
  • Re: current()
    • Jörg Heinicke - Tue, 27 Nov 2001 17:07:19 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.