Re: Keeping numeric entities intact when parsing and serializing?
by Nicolas Mendoza other posts by this author
Oct 9 2009 3:04PM messages near this date
view in the new Beta List Site
Re: Keeping numeric entities intact when parsing and serializing?
|
Re: Keeping numeric entities intact when parsing and serializing?
& XSLT On Fri, 09 Oct 2009 23:58:53 +0200, Petr Pajas <pajas@[...].cz>
wrote:
> 2009/10/9 Nicolas Mendoza <mendoza@[...].no>:
> > On Fri, 09 Oct 2009 22:51:32 +0200, Aristotle Pagaltzis
> > <pagaltzis@[...].de>
> > wrote:
> >
> >> * Nicolas Mendoza <mendoza@[...].no> [2009-10-09 17:55]:
> >>> Is there some way to keep the entities intact when parsing and
> >>> serlalizing numeric entities?
> >>
> >> Why would you want such a thing?
> >>
> >
> > Because I'm feeding it data and I want it to come out the same way? Just
> > like & does. (I want to distinguish an incoming ' and "'". So I
> > don't want it to alter my valid XML data, basically.)
> >
> > Actually it's a bit surprising that libxml2 does that.
>
> Huh? There is absolutly nothing surprising about that, it is an XML
> parser? Programming XML would be hell if XML parsers didn't do this.
> > From the XML point of view, ' and ' are the same thing! Read the
> XML spec.
>
> To be fair, there are few cases when particular formatting matters,
> but those are (supposed to be) dealt with by XML C14N (and possibly
> XML Encryption and XML Signature).
>
I think I can sympathize with your sentiments, but I'm not sure I can
agree 100% that altering in-data is the optimal way of functioning. No
matter if they are the same in theory.
Why would it be hell if XML parsers didn't convert numeric entities to
ASCII, UTF-8 (or whatever charset is possible/available at the time) on
serialization?
--
Nicolas Mendoza
http://my.opera.com/nicomen
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Nicolas Mendoza
Mirod
Jenda Krynicky
Nicolas Mendoza
Aristotle Pagaltzis
Nicolas Mendoza
Aristotle Pagaltzis
Petr Pajas
Nicolas Mendoza
Petr Pajas
Nicolas Mendoza
Aristotle Pagaltzis
Nicolas Mendoza
Nicolas Mendoza
Petr Pajas
|