Subject: Evaluating last 3 or 4 characters of URL?
From: David Pratt <prattda@xxxxxxxxxxxxxxx>
Date: Sun, 11 May 2003 21:08:48 -0500
|
I am trying to evaluate the last 3 or 4 characters of a URL
so that I can add javascript in the href attribute.
It is not liking the {@url}. Is this not just the string value
of the url attribute? Help on the syntax appreciated.
...more
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
</xsl:if>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="substring({@url}, -4, 4)!='.html'">
javascript: do_windowopen('
<xsl:value-of select="@url"/>
')
</xsl:when>
<xsl:when test="substring({@url}, -3, 3)!='.htm'">
javascript: do_windowopen('
<xsl:value-of select="@url"/>
')
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
...more
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Re: how to display html data, coming in a node, (continued)
- asim - Fri, 9 May 2003 06:48:25 -0400 (EDT)
- David Carlisle - Fri, 9 May 2003 07:09:02 -0400 (EDT)
- asim - Fri, 9 May 2003 10:01:36 -0400 (EDT)
- Michael Kay - Fri, 9 May 2003 08:53:12 -0400 (EDT)
- David Pratt - Sun, 11 May 2003 22:10:12 -0400 (EDT) <=
- Hemi Kara - Sun, 11 May 2003 22:50:03 -0400 (EDT)
- Hemi Kara - Sun, 11 May 2003 23:00:06 -0400 (EDT)
- David Pratt - Sun, 11 May 2003 23:43:12 -0400 (EDT)
- Michael Kay - Mon, 12 May 2003 21:03:58 -0400 (EDT)
|
|