Re: [xml] node() xpath and entity ref nodes
- From: Daniel Veillard <veillard redhat com>
- To: Vojtech Fried <vfried opentext com>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] node() xpath and entity ref nodes
- Date: Fri, 13 Feb 2015 06:27:17 +0100
On Fri, Nov 14, 2014 at 05:18:18PM +0000, Vojtech Fried wrote:
Please do not use the "Reply to" function of your mail client to compose new and independent mails to the
mailing list.
Ok, I am sorry. I didn't realize it is a problem. I can see it now.
There are no entity reference nodes in the XPath data model, see e.g.
<http://www.w3.org/TR/xpath/#data-model>.
But they are in libxml tree. It does not seem right to pretend to the xpath that they do not exist.
Hmm, at <http://www.w3.org/TR/xpath/#element-nodes> they say, that "Entity references to both internal and
external entities are expanded." Would that mean, that my xpath should return 2 (for two text nodes)? E.g.
expand the references and merge the second one with a preceding text node?
It looks like a grey area on the borders of the specs to me...
No it's libxml2 conforming to the spec. XML toolkits don't have to
implement everything according to the data model (like keeping CDATA
sections for example) but they must return consistant XPath output.
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]