ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: how prevent XML::Parser from resolving entity references?
by Petr Cimprich other posts by this author
Sep 16 2005 5:40AM messages near this date
view in the new Beta List Site
how prevent XML::Parser from resolving entity references? | Re: how prevent XML::Parser from resolving entity references?
& XSLT Alois Heuboeck wrote:

> 
>  1- take an XML file
>  2- in one script, replace everything above Unicode #x7F (end of ASCII) 
>  with entity references (which can either have "special" names, like 
>  ä or be based on the Unicode nb. like ®)
>  3- then in another script, do some more transformations using XML::DOM 
>  and
>  4- print out resulting XML
> 
>  My problem is that in the third step, when parsing its input, the 
>  XML::Parser seems to resolve those references that contain the HEX 
>  Unicode nb.; the "special name" references are not resolved.


Strings like ® are character references rather than entity 
references. A character reference is just an alternative way to express 
a character code point. Parsers make no difference between a character 
encoded with a specific encoding (such as utf-8) and the character 
reference. Your step 2 doesn't make much sense to me as XML works well 
with Unicode. What is the reason for it?

Petr

-- 
Petr Cimprich
Ginger Alliance
www.gingerall.com

_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Alois Heuboeck
Petr Cimprich
Alois Heuboeck

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved