xsl-list
[Top] [All Lists]

RE: passing xsl:value-of to HREF

2003-01-06 06:59:09
Use an Attribute Value Template:

 <tr>
                    <td align="right"><a
href="http://myserver.com:8881/sp/xmlReport?contentType=excel&amp;report
Type
=rates&amp;FUND={TIME_ZONE}"><img
src="/fd/images/bottom_nav_download.gif" width="157" height="21"
border="0"/></a></td>
                </tr>

Which is equivalent to:

 <tr>
                    <td align="right"><a>
<xsl:attribute name="href">
        
http://myserver.com:8881/sp/xmlReport?contentType=excel&amp;reportType=r
ates&amp;FUND=xsl:value-of select="TIME_ZONE">
</xsl:attribute>
<img src="/fd/images/bottom_nav_download.gif" width="157" height="21"
border="0"/>
</a>
</td>
</tr>


And read the specification and the FAQs some time - they have some
useful answers...

Rgs,

Ben

-----Original Message-----
From: Lee, Insoo [mailto:Insoo(_dot_)Lee(_at_)gs(_dot_)com] 
Sent: 06 January 2003 13:45
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] passing xsl:value-of to HREF




  Hi, in my XSL, I need to pass a value from XML to "href", but int
complains about "<", how would handle this?
  THanks
                <tr>
                    <td align="right"><a
href="http://myserver.com:8881/sp/xmlReport?contentType=excel&amp;report
Type
=rates&amp;FUND=<xsl:value-of select="TIME_ZONE">"><img
src="/fd/images/bottom_nav_download.gif" width="157" height="21"
border="0"/></a></td>
                </tr>

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


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