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

Re: Extracting hypertext attribut value of an xsl docu

Subject: Re: Extracting hypertext attribut value of an xsl document
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 30 Jan 2001 18:19:35 GMT
read attribut value in xsl

   1°)There's a link on my XSL document and 2°)there's the variable "my_var" 
   witch is defined *out* from the <a> element (this time).

   <a href="javascript:void(0)" Name="linkName">link</a>
   <xsl:variable name="my_var"><xsl:value-of select=...?></xsl:variable>

   My question is : how can I affect the variable "my_var" using the link Name 
   attribute (Name="linkName") instead of using it value ("linkName") ?

   I can directly affect "my_var" with the "linkName" string as follows...

   <xsl:variable name="my_var">linkName</xsl:variable>

   ... but I prefer to affect it using the Name link attribute.



If your aim is to avoid specifying LinkName twice, then you just need to
specify the variable first:


   <xsl:variable name="my_var">LinkName</xsl:variable>
   <a href="javascript:void(0)" Name="{$my_var}">link</a>


If you really want to have it on the order you said, you need to read
the stylesheet as an input document to itself, like so



   <a href="javascript:void(0)" Name="linkName">link</a>
   <xsl:variable name="my_var"  select="document('')//a/@Name"/>

if there's more than one <a> in your stylesheet that has a Name
attribute then you'd have to give a more specific xpath to it.

David

 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.