xsl-list
[Top] [All Lists]

RE: How to escape invalid characters in XML to XML process

2003-01-22 00:44:12
Hi,

I'm receiving my input XML from an ASP page, and i get a lot 
of invalid for
XML characters. How can I escape/convert these invalid 
characters for XML
into valid characters. I need to do this because after the 
transformation I
post my output XML once again into a ASP page. This is the process:
 getXML from ASP --> applyXSLT --> output XML --> 
validateXML(use Schema)
--> postXML to ASP
 Can I do that in XSLT when I receive my input XML by matching these
characters and convert them? If yes, how? Validation is done 

No. Your XSLT engine uses an XML parser when building the XPath source tree, 
and if the parser rejects the input, it'll never reach XSLT processing.

Use e.g. sed, perl etc. to fix the input; or better yet, fix the ASP that's 
generating the ill-formed XML.

Cheers,

Jarno - Dreadful Shadows: Homeless (Cyber edit)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>