Re: XSL Programming
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
G wrote:
> In this chunk of XSL:
>
> <a>
> <xsl:attribute name="href">
> <xsl:value-of select="SiteURL" />
> </xsl:attribute>
> </a>
>
> This returns a URL like so:
> http://www.site.com
>
> If I want to add something to the BEGINNING of http://www.site.com and have
> NO ACCESS to the database where this link sits, how can I manipulate the XSL
> to do this? For example, I want instead:
> http://www.mywebsite.com/tracking.asp?Link=http://www.site.com
You could use an attribute value template on a literal attribute
<a href="http://www.example.com/tracking.asp?Link={SiteURL}"></a>
or if you want to use the verbose way
<xsl:attribute name="href">
<xsl:text>http://www.example.com/tracking.asp?Link=</xsl:text>
<xsl:value-of select="SiteURL" />
</xsl:attribute>
Note that this group is about Mozilla specific XSLT problems so you
should ask further general XSLT questions on an appropriate group or list.
--
Martin Honnen
http://JavaScript.FAQTs.com/