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

Re: How to create variable element from a couple of st

Subject: Re: How to create variable element from a couple of strings
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 24 May 2001 00:18:48 -0600 (MDT)
xslt create variable
Yang wrote:
> <xsl:variable>
> <xsl:attribute name="name"><xsl:value-of select="substring-before($nx,',')"/>
> </xsl:attribute>
> <xsl:value-of select="substring-before($s,',')"/>
> </xsl:variable>

xsl:attribute is only for adding an attribute to an element in the result
tree. It must follow an instruction to put an element in the result tree.  
It is not for adding an attribute to an XSLT instruction, which is not in 
the result tree.

As for what you are trying to do, you cannot calculate the name of a
variable. The name has to be hard-coded. Sorry.

   - Mike
_____________________________________________________________________________
mike j. brown, software engineer at  |  xml/xslt: http://skew.org/xml/
webb.net in denver, colorado, USA    |  personal: http://hyperreal.org/~mike/

 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.