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



Hi Daniel,
        That answer solves my problem in a very elegant way ! :)
(ie: with no extra work on my part).

        Many thanks,
        Balint


Daniel Veillard wrote:
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* !

    Thanks,

Daniel




--
-------------------------------------------------------------------
Dr Balint Joo                         Post Doctoral Research Fellow
School of Physics
University of Edinburgh
Mayfield Road, Edinburgh EH9 3JZ
Scotland UK
Tel: 0131 650 6469 (from UK) +44-131-650-6469 (from outwith UK)
Fax: 0131 650 5902 (from UK) +44-131-650-5902 (from outwith UK)
email: bj ph ed ac uk           bj phys columbia edu
WWW  : http://www.ph.ed.ac.uk/~bj
-------------------------------------------------------------------




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