[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Select statement within HREF


Subject: Re: [xsl] Select statement within HREF
From: Mukul Gandhi <mukulgw3@xxxxxxxxx>
Date: Fri, 31 Oct 2003 03:45:01 -0800 (PST)

Assuming, the XML is --

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <a name="AFC"></a>
</root>

The following XSL --

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0"
encoding="UTF-8" indent="yes"/>
	
<xsl:template match="/root">
  <xsl:variable name="name_of_a" select="a/@name" />
    <a href="{$name_of_a}/file.xml" >
       <xsl:value-of select="$name_of_a" />
    </a>
</xsl:template>
</xsl:stylesheet>

*when applied to the XML*, produces o/p --
<a href="AFC/file.xml">AFC</a>

Hope, my answer is useful..

Regards,
Mukul


--- SHEIKH Sajjad <Sajjad.SHEIKH@xxxxxxxxxxx> wrote:
> Hi
> 
> I want to use a select statement within anchor hyper
> ref[=a href].  
> 
> Example:
> <a href="(<xsl:value-of
> select="@name/>)/(file.xml)">"><xsl:value-of
> select="@name"/></a>
> 
> So the final result will be as following
> 
> For example <xsl:value-of	select="@name"/> returns
> AFC
> It will show <a href="AFC/file.xml">AFC</a>
> 
> Any help will be appreciated.
> 
> Regards,
> 
> /s
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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



Current Thread
Keywords