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

Re: transform a link

Subject: Re: transform a link
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Thu, 15 Nov 2001 23:36:17 +0100
Re:  transform a link
> In the xsl file, I use the following trick:
> <xsl:variable name="link">
>    ../../details/invoice/detail_1.htm
> </xsl:variable>

Hi Yan,

the problem is in the variable. All spaces and linebreaks from <xsl:variable
name="link"> to </xsl:variable> will be stored in $link. To avoid this write

<xsl:variable name="link">../../details/invoice/detail_1.htm</xsl:variable>

or

<xsl:variable name="link">
    <xsl:text>../../details/invoice/detail_1.htm</xsl:text>
</xsl:variable>

> <a>
>    <xsl:attribute name="href">
>        <xsl:value-of select="$link"/>
>    </xsl:attribute>
>    <xsl:value-of select="link_title"/>
> </a>

This can be shortened using attribute value template {}:

<a href="{$link}">
    <xsl:value-of select="link_title"/>
</a>

Is there a must for the variable?

Why not writing <a href="../../details/invoice/detail_1.htm">?

Regards,

Joerg


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


Current Thread
  • Arrays in XSL
    • Vaibhava - Thu, 15 Nov 2001 13:07:34 -0500 (EST)
      • David Carlisle - Thu, 15 Nov 2001 13:35:09 -0500 (EST)
        • yan bai - Thu, 15 Nov 2001 16:57:35 -0500 (EST)
          • Jörg Heinicke - Thu, 15 Nov 2001 17:35:57 -0500 (EST) <=
          • yan bai - Thu, 15 Nov 2001 19:57:26 -0500 (EST)
          • Michael Kay - Fri, 16 Nov 2001 04:20:10 -0500 (EST)

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.