[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

particular parameter

Subject: particular parameter
From: "g.carlone@xxxxxxxxx" <g.carlone@xxxxxxxxx>
Date: Fri, 16 Nov 2001 23:13:43 +0100
xlink href parameter
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.