[xsl] particular parameter

Subject: [xsl] particular parameter
From: "g.carlone@xxxxxxxxx" <g.carlone@xxxxxxxxx>
Date: Fri, 16 Nov 2001 23:13:43 +0100
Dear all this is my first question!
Regards to everybody.

This is a generic file ,it could contain a lot of <cons> element

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="proj2.xsl"?>
<Base>
  <cons>   
   <State> no </State>
   <Locat xlink:href="http://www.w3.org"; xlink:label="source" 
xlink:title=" "/>
   <Locat xlink:href="http://www.sun.com"; xlink:label="dest" 
xlink:title=" "/>
  </cons>
  <cons>  
    <State> no </State>
     <Locat xlink:href="http://www.ucl.ac.uk"; xlink:label="source" 
xlink:title=" "/>
     <Locat xlink:href="http://xml.apache.org"; xlink:label="dest" 
xlink:title=" "/>
  </cons>
</Base>

I want to select the xlink:href , and put the value in the <a href...> 
The my stylesheet is the follow but it does not work!!Why?
How change it?
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink";>

<xsl:template match="Base/cons">
<xsl:param name="param1">
 <xsl:value-of select="Locat[position()=1]/@xlink:href"/>
</xsl:param>
<xsl:param name="param2">
 <xsl:value-of select="Locat[position()=2]/@xlink:href"/>
</xsl:param>
<a href="xxxxx{$param1}xxxxx{$param2}xxxxx">lucky</a>
</xsl:template>

<xsl:template match="/">
 <html>
  <xsl:apply-templates/>
 </html>
 </xsl:template>
</xsl:stylesheet>

Where the xxxx could be a servlet that is waiting for the URL parameter 
someting like http://servlet?myValue={$param1} ...

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


Current Thread