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

RE: eval : how to pass a <xsl:value-of> ?

Subject: RE: eval : how to pass a <xsl:value-of> ?
From: Benoît BARRE <benoit.barre@xxxxxxxxxx>
Date: Fri, 18 Feb 2000 16:40:03 +0100
xsl eval xsl
You don't need to call <xsl:eval> in that case.

Note : <xsl:variable> is accessible the preview XSLT package.

Benoit
-----Message d'origine-----
De : SPANTIN@xxxxxx [mailto:SPANTIN@xxxxxx]
Envoyé : vendredi 18 février 2000 14:29
À : xsl-list@xxxxxxxxxxxxxxxx
Objet : xsl:eval : how to pass a <xsl:value-of> ?


Hi everybody,

I'm a newbie in XSL and I'm trying with no luck to do the following (or the
equivalent) with IE5 :

<xsl:template match="Graphic">
     <IMG>
     <xsl:attribute name="src"><xsl:value-of
select="@FileRef"/></xsl:attribute>
     <xsl:attribute name="alt"><xsl:eval><xsl:value-of
select="@FileRef"/></xsl:eval></xsl:attribute>
     </IMG>
</xsl:template>

The error comes from the fact that I can't put an <xsl:value-of> inside a
<xsl:eval>. So how could I do that ?

Since <xsl:variable> is not accessible with IE5, I tried the script,
somthing like this :
<xsl:script><![CDATA[
     function GiveAlternate(img){
             return img.src;
          }
]]></xsl:script>


<xsl:template match="Graphic">
     <IMG>
     <xsl:attribute name="src"><xsl:value-of
select="@FileRef"/></xsl:attribute>
     <xsl:attribute
name="alt"><xsl:eval>GiveAlternate(this)</xsl:eval></xsl:attribute>
     </IMG>
</xsl:template>

But then, it gives me an empty string.

So, I'm stuck here and I would appreciate any help/suggestions.

Thanks,
Stéphane Pantin


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.