Re: Re[4]: [xml] bug with created attribute nodes?



On Wed, Dec 25, 2002 at 09:41:09PM +0300, Alexander Grimalovsky wrote:
Hello Daniel,

 Yesterday i speak with some other people in public XML forums about
my question and they tell me, that your position seems to be more
correct then mine, but this thing is not clearly specified into any
available specification.
 But i still have 2 questions about this topic and one of them
confuses me a bit, can you please comment it?

1. If current behaviour of libxml2 is expected - is it mean, that i
should manually perform analize of a text, i want to set as attribute
value for entities, split it up in parts and construct actual
attribute value as set of Text and EntityReference objects?

  No. Libxml does it. The point is that a charref or a predefined
entity ref is directly handled by libxml2 (of course !).

<?xml version="1.0"?><root a="a&amp;amp;b">a&amp;b</root>

 Can you please explain, why "&amp;" being set in attribute value is
quoted while same "&amp;" being set as node value is treated as entity
reference?

  Because they are 2 different API calls. Nothing allows you to
assume they have the same behaviour. Maybe they should, well they
don't and I don't want to break the existing semantic of the APIs 
now, unless I get a majority of users asking for a change, and in that case
I would even prefer adding a new API instead of changing the existing
one.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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