|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] particular 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








