This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: transform a link


You are right.  Thanks very much.

Yan.


--- Jörg_Heinicke <joerg.heinicke@gmx.de> wrote:
> > 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
> 


__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]