[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Invalid characters


Subject: Re: [xsl] Invalid characters
From: Stuart Jansen <sjansen@xxxxxxxxxxxx>
Date: Mon, 18 Jul 2005 12:12:45 -0600

On Mon, 2005-07-18 at 10:37 -0700, Jonathan Marenus wrote:
> When I run my XSL, I get an error related to invalid
> characters in my XML.  Is there a simple way I can get
> rid of these, since the file is very large and it
> would take a while to go line by line?

As already mentioned, the problem is probably one of encoding. Any
automated solution includes the possibility of corruption. That said,
there are a number of solutions you might try:

If you have the Java JDK installed, you might have the program
native2ascii installed.

Alternatively, on my Linux box I have the recode and iconv commands.

Finally, if the problem is merely a character in the high ascii range,
the following perl command with strip out anything greater than ascii
128.

perl -e 's/[\x80-\xFF]//g' -p Work/Xiphias/xsl/escape.xml

-- 
Stuart Jansen <sjansen@xxxxxxxxxxxx>
Guru Labs, L.C.


Current Thread
Keywords
xsl