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

xsl:element name value with Attribute Value Template a

Subject: xsl:element name value with Attribute Value Template at run-time
From: Arvind Bassi <arvind_bassi@xxxxxxxxxxx>
Date: Wed, 29 Oct 2003 00:23:31 +0000 (GMT)
xsl element name
Dear All,

Many thanks in advance for any help that can be provided in this.

I am having some trouble passing in the value of a <xsl:variable> into
the name attribute of <xsl:element>, e.g. 

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet extension-element-prefixes="xslt-ext" version="1.0">
<xsl:variable name="elementName" value="foo"/>
<xsl:template match="/">
    <xsl:element name="{$elementName}">Will this work?</xsl:element>
</xsl:template>
</xsl:stylesheet>

The Xalan processor complains that the attribute name is not valid
because the $elementName variable is blank. I have tried using the
<xsl:param> element aswell, but with the same problem. Additionally, l
have tried to use $elementName by itself but the "$elementName" is not
a valid qname.

How do reference the $elementName variable so that "foo" is placed
inside the <xsl:element> element?

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

 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.