This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: invalid character (Unicode: 0xa0) in xsl document
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] invalid character (Unicode: 0xa0) in xsl document
- From: "jackson" <jackson at dstc dot edu dot au>
- Date: Sat, 28 Apr 2001 23:33:44 +1000
- Cc: "David Jackson" <jackson at dstc dot edu dot au>
- Organization: DSTC
- References: <3D4E3D42C5B35D115A4600807CFD4B52@alan.eustace.ireland.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Alan
> I'm processing an xsl file with the apache xalan 2 processor, and am
> getting the following error message when i run my application:
>
> javax.xml.transform.TransformerConfigurationException: An invalid XML
> character (Unicode: 0xa0) was found in the element content of the
> document.
Well, your document says it's UTF-8. I'm not an expert on Unicode
and related issues, but i think 0xa0, while it is Unicode, is not a possible
UTF-8 character.
The character 0xa0 is a non-breaking space. I don't know how
it might have got in your document (possibly from some HTML?),
but you could find it and get rid of it. Since it's white space, it's
not going to be obvious.
You could write a script to look for this character and change
it - say, to a normal space. You could also do it in your java
program i suppose, before parsing.
I suppose you could also turn 0xa0 into the UTF-8 equivalent
(i can't help you there). Java classes might be able to do it for
you - from what i remember (quite a while ago), there is a class
for writing to a UTF file?
David Jackson
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list