[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: double escaping problem [re-visited]
On Tue, 13 Nov 2007, Michael Kay wrote:
The document() function invokes an XML parser and it can only do what an XML parser does. Thanks to you and Abel Braaksma I have figured out the problem, which I'll describe briefly here. One mistake was that I assumed the "raw" xml as viewed through Firefox was the actual text of the XML, but indeed, a double escaped ampersand was being masked. The cause of the double escaping in the source document was due to the fact that I had switched from a string concatenation method of constructing the xml out of the database to using PHP's SimpleXML functions. In the string concat code I was using the htmlspecialchars() function to properly escape text coming from the database. I failed to realize that this was unnecessary with the SimpleXML functions, since those functions do all the escaping that needs doing in order to create valid xml. So eliminating those superfluous htmlspecialchars() calls fixed the problem. many thanks! Peter Keane
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|