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

Re: Invalid characters in xsl:element

Subject: Re: Invalid characters in xsl:element
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxx>
Date: Tue, 22 May 2001 18:24:34 +0100 (BST)
xml attribute invalid characters
Jason Macki wrote at 22 May 2001 11:56:43 -0500:
 > When I use the following to get the tag name:
 > 	 <xsl:element name="substring-after(substring-after(.
 > ,'!'),'!')">
 > 	</xsl:element>
 > 
 > I get the error "A name contained an invalid character".  Now, I've
 > tested this function using the xsl:value-of element, and there were no
 > invalid characters in the result.  

Add the {} for an attribute value template:

	 <xsl:element name="{substring-after(substring-after(.
,'!'),'!')}">
	</xsl:element>

since without that, you were specifying an element named
"substring-after(...".

Also, shouldn't your outer substring-after() be a substring-before()?

Regards,


Tony Graham
------------------------------------------------------------------------
Tony Graham                           mailto:tony.graham@xxxxxxxxxxxxxxx
Sun Microsystems Ireland Ltd                       Phone: +353 1 8199708
Hamilton House, East Point Business Park, Dublin 3            x(70)19708

 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.