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: "Clapham, Paul" <pclapham at core-mark dot com>
- Date: Tue, 22 May 2001 10:18:37 -0700
- Reply-To: xsl-list at lists dot mulberrytech dot com
[substring-after(substring-after(.,'!'),'!')] applied to [!tagname!value]
would give [value] and not [name], would it not? Perhaps you need
[substring-before(substring-after(.,'!'),'!')] instead.
PC2
-----Original Message-----
From: Jason Macki [mailto:jmacki@iisd.ca]
Sent: May 22, 2001 09:57
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] Invalid characters in xsl:element
Hello,
I'm trying to write an xsl file that will convert the following:
<line>!tagname!value</line>
into this:
<tagname>value</tagname>
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.
Is the parser finding the invalid character before the substring is
removed? If so, is there any way to tell the parser to wait until after
the function has been applied before checking for invalid characters?
Thanks,
Jason
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list