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

RE: xsl:variable question

Subject: RE: xsl:variable question
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Mon, 28 Feb 2005 13:25:58 +0200
RE:  xsl:variable question
Hi,

> I have a construction which looks as following:
>
> <xsl:variable name="tree-structure-new-branch">
>     <xsl:choose>
>         <xsl:when test="not(position()=last())">
>             <img width="16" height="16"
>                  alt="Der Zweig geht nachher noch weiter"/>
>         </xsl:when>
>         <xsl:otherwise>
>             <img width="16" height="16" alt="Der Zweig endet hier"/>
>         </xsl:otherwise>
>    </xsl:choose>
> </xsl:variable>
>
> I have traced through this piece of code, it seems to follow
> my xml tree
> well. But the variable I define here is empty after leaving this xsl
> structure.

Define "empty". The string value of the RTF the variable is bound to is an
empty string, but it has content.

Are you using xsl:value-of to output the value of the variable to the result
tree? Use xsl:copy-of if you are, as that copies the RTF to the result tree.

Cheers,

Jarno

Current Thread

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.