[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: RE: How to escape invalid characters in XML to XML process
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 22 Jan 2003 09:44:12 +0200
perl escape xml
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.