XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Manikandan SurendranathSubject: retaining named entities
Author: Manikandan Surendranath
Date: 06 Jun 2005 06:41 AM
The XSLT (v 1.0) that I have written reads a XML file and outputs a transformed XML file (ASCII encoding). After this transformation process, the named entities like   ’ are changed to   and ’. I know that these are being picked up from DTD. My client processor is compatible to XSLT 1.0 only and therefore I can not use character map.

Can some one tell me how to avoid this or is there a patch?

Postnext
Tony LavinioSubject: retaining named entities
Author: Tony Lavinio
Date: 06 Jun 2005 09:06 PM
By the time any XSLT engine sees the data, it has been parsed by the
XML parser. And all XML parsers expand entities when building the
infoset. So not only is there no patch to fix this, there is not a
way for any XSLT engine to know whether a sequence of characters was
explicit or came from some entity, because XSLT deals not with the
input stream directly, but with a view of the world as all Unicode
text. (This is also why you can't tell if your input is from a literal
text element or CDATA.)

In order to produce them as output, you need something like the
character maps of XSLT 2, or you must post-process the output.

You could write a simple post-processor, say in Java, and place it in
the scenario properties as the post-processor, and we will call it for
you.

Posttop
Manikandan SurendranathSubject: retaining named entities
Author: Manikandan Surendranath
Date: 07 Jun 2005 01:28 AM
Thanks. But my client uses Saxon 6.5. I have suggest them to go for UTF-8 encoding and not to retain named entities.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.