W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

Re: easy way to do a hyper link with xsl?

From: Daniel Acton <dacton@itouch.co.za>
Date: Fri, 6 Oct 2000 07:57:30 +0200 (SAST)
To: Clint Field <Clint@eCorporation.com>
cc: www-xml-schema-comments@w3.org, xmlschema-dev@w3.org
Message-ID: <Pine.BSF.4.21.0010060728490.56055-100000@alcapone.intouch.co.za>

Hi Clint

I see you have an <xsl:value-of> bit there, so am going to assume that you
are using some xsl. You can build up an xml element and assign it
attributes and values: 

<code>

<xsl:element name="a">
  <xsl:attribute name="href">
    <xsl:value-of select="Products.asp"/>?code=<xsl:value-of select="ecgcode_description"/></xsl:attribute>
  <xsl:value-of select="ecgcode_description"/>
</xsl:element>

</code>

So what the above snippet does, is build up your <a> tag. 
Granted, the above is largely synonymous with what youe wrote, but may
clear things up a bit. Another thing is that perhaps your desired results
aren't coming through because the value you're looking for is being
referenced as an element?

I don't know if this will help, but give it a bash.
Dan.

On Thu, 5 Oct 2000, Clint Field wrote:

> Hello,
> 
> Is there a simple way to get the value of a node in a link?
> 
> For example:
> 
> <b>Category: </b>
>    <a href="Products.ASP?Code=">
> 	<xsl:value-of select="ecgcode_description"/>
>    </a>
> 
> I want the node giving the code description to appear in the link as well,
> so it appears like this:
> 
> <a href="Products.ASP?Code=Widgets>Widgets</a>
> 
> But this sample wont give me that:
> 
> <a href="Products.ASP?Code="<xsl:value-of select="ecgcode_description"/>"
> <a href="Products.ASP?Code=">
> </a>
> 
> 
> How can this be done?  Should I set a variable and place it in {CODE}?
> 
> Any thoughts would be appreciated.
> 
> Thanks,
> Clint
> 
> 
> 
Received on Friday, 6 October 2000 02:00:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:48 GMT