Re: [xml] Encoding attributes

On Wed, Jun 05, 2002 at 12:36:34PM +0200, chrisbee xml swing be wrote:
A lot of question about encoding are already asked before. Following
a previous mail (25 sep 2001) \"How to create an ISO-8859-1 encoded xml
file? (following)\", it seems that the content of entities are output
with the ISO-8859-1 characters, but not for attributes (that are output
with hex encoding &x..;) ?
I would like to know if there is a reason to handle attributes
differently ? If no, is there something planned to take account also of
attributes ?

  Hum, right. I don't remember this point being raised before, the
code handling this is xmlAttrSerializeContent() and could be changed
to avoid this effect quite easilly. However character references
are semantically totally equivalent (except for the special cases
of blanks characters) and an application should not care about the
distinction in the serialization. So yes this is a bit strange, but
no this wasn't a problem so far and shouldn't in general.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]