xsl-list
[Top] [All Lists]

Re: Select statement within HREF

2003-10-31 04:45:01
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(_dot_)SHEIKH(_at_)efsa(_dot_)eu(_dot_)int> 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



<Prev in Thread] Current Thread [Next in Thread>