Re: [xml] libxml seems to add fault/redundant xmlns:xml statement



On Sun, Nov 21, 2004 at 10:56:40PM +0100, Peter Korf wrote:
Hi, 

I have some questions about libxml..and the xmlnsml statement.

  What version of libxml ? I hope it's libxml2
I know nothing about "xmlnsml" please be *extremely* precise when
trying to report problem if you want any useful feedback.

it seems libxml generates such statements into svg drawings from inkscape.

  unlikely !

paphio:~/XML -> grep xmlnsml *.c
paphio:~/XML -> grep xmlnsml include/libxml/*.h
paphio:~/XML ->

and xalan can't process files which contains this statement.

  What statement *exactly* !

Related to this I found: 
http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001OctDec/0111.html

  The original post is right, in stating

: The prefix xml is by definition bound to the namespace name 
: http://www.w3.org/XML/1998/namespace. The prefix xmlns is used only for 
: namespace bindings and is not itself bound to any namespace name.

 Is there is any reason for adding this?

  Adding *what* ? Adding 
    xmlns:xml="http://www.w3.org/XML/1998/namespace";
is not an error, it is not a requirement either.

It would be added if the file contains any other xml:* attribute.

  xml prefix is always an in scope namespace, declared explicitely or not.

   http://www.w3.org/TR/xpath#namespace-nodes
"Each element has an associated set of namespace nodes, one for each
 distinct namespace prefix that is in scope for the element (including
 the xml prefix, which is implicitly declared by the XML Namespaces
 Recommendation [XML Names])"

I don´t know if this is a problem of xalan or libxml (or both),
but OpenOffice can not open SVG from inkscape, because it uses xalan.
see: http://www.openoffice.org/issues/show_bug.cgi?id=2497

If there is any way to remove this statement or is this an issue for xalan?

  Then xalan would be broken. It should not break on an
    xmlns:xml="http://www.w3.org/XML/1998/namespace";
statement, this is basically a no-op for any XML Namespace 1.0 conformant
document (which is a requirement for XPath/XSLT processing). That declaration
is also not needed this is a default intanciated namespace declaration at the
XPath level:

  Someone seems deeply confused by not understanding the set of XML
specs (this is relatively common) but I can't say where or who as your
report totally lack clarity !

  For any further information:
    - provide a complete explanation of the problem
    - provide the versions of libxml2 (or libxslt)
    - explain how the error arise

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://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]