This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]