xsl-list
[Top] [All Lists]

Re: [xsl] Illegal xml chars

2007-12-13 08:01:27
Hi Alice,

Data is coming from a vendor which has allowed for whatever reason to have this character in their data. I'm applying the transformation to convert it to another format. As far as I know the valid char range is: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF].

I'm need someway to handle this illegal character and the other possible culprits that may arrive in the future.

Any help will be greatly appreciated.

Thanks,
-Waqar

From: Alice Wei <ajwei(_at_)indiana(_dot_)edu>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Illegal xml chars
Date: Thu, 13 Dec 2007 09:47:26 -0500

Hi, Waqar:

Mind if I ask what is it you tried to put in your XML? As far as I know, 0x08 is not an existing character (and neither is &#x8. That is why it is giving you weird characters when you transform it. I am also surprised that it allows you to transform when you have this kind of character.

Hope this helps.

Alice

Quoting Waqar Ali <waqarali_pk(_at_)hotmail(_dot_)com>:

Hello:

I have an illegal character in my xml (0x08 or ) and when I
tries to transform it using xslt, the parser (MS .NET) gives me an
error(hexadecimal value 0x08, is an invalid character). I tried
everything: using different encoding, wrapping my xml data in CDATA
tags but nothing seems
to be working. What do you suggest?

I may end up removing the illegal chars manually using a regular
expression. Do you know one which can remove  and other illegal
chars from the xml?

Thanks,
-Waqar



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--