| 
 
Subject: RE: [xsl] Extracting link information from xml document and displaying it in browser as hyperlink From: bmcleere@xxxxxxxxxx Date: Tue, 10 Jun 2003 14:23:55 +0100  | 
Jarno,
- thank you very much. The following line of code worked:
<a href="{.}">
<xsl:value-of select="."/>
</a>
Much appreciated.
Brenda
xsl-list@xxxxxxxxxxxxxxxxxxxxxx wrote:
<  
<  Hi,
<  
<  >  <location> http://someserver.ie</location>. 
<  >  
<  >  I want to retrieve the URL information and display it as a 
<  >  hyperlink in the browser.
<  >  
<  >  Currently, I can view the URL information but it is not a hyperlink. 
<  >  
<  >  I thought of using the following:-
<  >  <xsl:template match="technical/location">
<  >  <a href="http://{@link}"><xsl:value-of select="."/></a>
<  >  </xsl:template>
<  >  
<  >  I will be searching different documents so hardwiring in the 
<  >  URL where it says "@link" would not provide a solution for 
<  >  me. I think that if I could declare a variable in xsl to 
<  >  store the retrieved data and then get at the contents of this 
<  >  variable within the <a href...> tag - this would provide a solution.
<  
<    <a href="{.}">
<      <xsl:value-of select="."/>
<    </a>
<  
<  if the source is as you showed above. If the location of the URL varies, try something like
<  
<    <a>
<      <xsl:attribute name="href">
<        <xsl:choose>
<          <xsl:when test="...">
<            ...
<          </xsl:when>
<          ...
<        </xsl:choose>
<      </xsl:attribute>
<      <xsl:value-of select="."/>
<    </a>
<  
<  Cheers,
<  
<  Jarno - Front Line Assembly: Virus (Counterized Mix)
<  
<   XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
<  
<  
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Extracting link informati, bmcleere | Thread | [xsl] removing superfluous nodes, dave peeters | 
| Re: [xsl] Extracting link informati, bmcleere | Date | Re: [xsl] read/write in the same xm, abbouh | 
| Month |