[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: "Jason Macki" <jmacki@xxxxxxx>
Date: Tue, 22 May 2001 12:21:29 -0500
xsl invalid character
Yes, you're correct.  The function that I gave in the example was the
function that I used to extract the value, not the tag name.

substring-before(substring-after(.,'!'),'!')

Is the function that I use to extract the tag name.  When I use this
function in an xsl:value-of element, it returns the expected results,
without any invalid characters.  However, when I use it in

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

I get a "name contains an invalid character" error.  My guess is that
the parser checks the value for invalid characters before it applies the
function.  Does anyone know a way around this problem?

Thanks,
Jason

p.s. My parser is MSXML version 3.


-----Original Message-----
From: Clapham, Paul [mailto:pclapham@xxxxxxxxxxxxx]
Sent: Tuesday, May 22, 2001 12:19 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Invalid characters in xsl:element


[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@xxxxxxx]
Sent: May 22, 2001 09:57
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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


 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.