xsl-list
[Top] [All Lists]

Re: passing xsl:value-of to HREF

2003-01-06 07:08:48
Hi Lee,

  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;reportType
=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>

If the source XML document is valid then the "<" and ">" must be
entities "&lt;" and "&gt;" even when in an attribute.

<row url="...&lt;...&gt;">

The value can be loaded into the <a> tag as normal and the rest
will just work.

<xsl:template match="row">
 <a href="{(_at_)url}">
  ...
 </a>
</xsl:template>

I hope this helps.
Peter



--
   ___
  (OvO)
  /:::\
  \|:|/
/--m-m--------------------------------+
| Peter Finch (p(_dot_)finch(_at_)homepla(_dot_)net)   |
| Home Planet Software                |
| http://www.homepla.net/             |
/-------------------------------------/




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