This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Invalid characters in xsl:element
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Invalid characters in xsl:element
- From: Tony Graham <Tony dot Graham at ireland dot sun dot com>
- Date: Tue, 22 May 2001 18:24:34 +0100 (BST)
- References: <89CD4E678F22EA44ABCDE49C8010176F0F388D@marathon.iisd.ca>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@ireland.sun.com
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