Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Handling invalid characters

From: "Michael Kay" <mike@------------>
To:
Date: 10/2/2006 9:38:00 PM
XSLT can only handle well-formed XML documents, so you need to fix the
problem at the point where you are generating XML: that is, in your php
function. In fact, it goes without saying that if you have code that
attempts to generate XML, it should always generate well-formed XML.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: Huynh Bao-E11524 [mailto:bao.huynh@xxxxxxxxxxxx] 
> Sent: 02 October 2006 21:42
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Handling invalid characters
> 
> Hi all,
>  
> Is there a way to handle/discard invalid characters?
>  
> Problem:
> I have to use data from several different sources that have 
> different/unknown encoding types.  I store all of them in a 
> MySQL db using ISO-8859-1 encoding.  A php function grabs the 
> data and fits it into XML format.  When I use the XML file as 
> input to an xsl transform, I get "Invalid character 
> (character code 25) detected".
>  
> Possible solutions:  
> 1) I would prefer to somehow convert all invalid characters to valid
> ISO-8859-1 (I also have control of the php function)
> 2) Delete all the invalid characters
> 3) Display them as gibberish in my documents
> 4) Basically anything that won't cause an error and will let 
> the transform continue
>  
> Any lead would be much appreciated,
> Thanks,
> Bao


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent