Re: [xml] XPath and default namespaces (bet you're sick of this by now :) )

On Tue, Apr 22, 2003 at 10:38:45AM +0100, Balint Joo wrote:
Hence my natural inclination for defining the default namespace for 
XPath would be to pass a NULL prefix to xmlXPathRegisterNs, which of 
course the above code snippet immediately rejects as erroneous.

  You cannot define a default namespace for XPath, period, don't
try you can't, the XPath spec does not allow it. This can't work
and trying to add it to libxml2 would simply make it non conformant
to the spec.

  In a nutshell forget about using default namespace within
XPath expressions, this will *never* work, you *can't* !



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]