Re: [xml] libxml2 and default namespaces



On Sunday 11 December 2005 01:34, Rob Richards wrote:
Daniel Veillard wrote:
DOM is irrelevant, what matters is XML. Libxml2 does not implement DOM.
If you're discussing about whether an API allows somthings in a memory
tree, then that's not XML, it's irrelevant. If you are discussing about
how an instance looks like, then XML is a normative prose which tells
what is flawed and what is not.

Your example had a serialization without the xmlns, so there is no
namespace from an XML perspective. Anything else is discussions about
implementations, are implementation specific and not normative from my
point of view.

I'm want to add this comment from my perspective and leave this thread
at that not to keep this going.

I don't want to pollute this list with discussions that are probably more 
relevant to various XML standardisation lists/committees. However, my 
intention was just to clarify whether I had the right expectations in using 
the libxml2 API and in the resulting serialisation. (As I may have said, I 
believe libxml2 is doing the right thing here.)

 From my POV, if you build a document using DOM (or however you want to
do it) and it doesn't have the same meaning when serialized then
something is seriously wrong. So, omitting the default namespace when
serialized produces a different meaning of the document than what was
built... that is just plain wrong (again my opinion).

Perhaps the real issue is whether a namespace set on an element whose 
qualified name is unprefixed can be discarded in the serialisation. That I 
may have declared the namespace, but since no prefix is specified I haven't 
(according to some interpretations) actually used it, and that the 
information can be legitimately discarded. Such reasoning sounds dubious to 
me, but it wouldn't surprise me if such loopholes existed in the 
specifications.

Paul



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