After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772102 - [PATCH] Implement XPath
[PATCH] Implement XPath
Status: RESOLVED FIXED
Product: gxml
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GXml maintainer(s)
GXml maintainer(s)
Depends on:
Blocks: 772194 772195
 
 
Reported: 2016-09-28 04:41 UTC by Yannick Inizan
Modified: 2016-09-29 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Implement XPath (4.77 KB, patch)
2016-09-28 04:41 UTC, Yannick Inizan
committed Details | Review

Description Yannick Inizan 2016-09-28 04:41:28 UTC
Created attachment 336416 [details] [review]
[PATCH] Implement XPath

This patch add 'evaluate' method to DomElement, so we can evaluate XPath expression on any node.
Comment 1 Daniel Espinosa 2016-09-29 16:03:42 UTC
Review of attachment 336416 [details] [review]:

I've committed your patch. Just I have to comment this:

* We need to create a XPathContext interface to add related methods to it
* Move the methods added to DomElement interface to XPathContext on
* Declare GElemento to implement XPathContext
* Need to add test cases
* Need to declare the specification implemented by libxml2 and check if we can expand it to latest XPath 3.1 specification

Doing to will keep DOM4 implementation clean from any other outside its own specification and will allow others to implement XPath.
Comment 2 Daniel Espinosa 2016-09-29 17:14:22 UTC
Yanick,

You forget to add your license. Please confirm I can set it to LGPL, in order to update your code.
Comment 3 Yannick Inizan 2016-09-29 18:06:39 UTC
of course. anyone can use & share my work on GXml :)
Comment 4 Yannick Inizan 2016-09-29 18:19:11 UTC
XPath.vala is missing
Comment 5 Daniel Espinosa 2016-09-29 18:45:29 UTC
Ok. Thank you. I pushed all my latest changes, and the missing files, to upstream.

Sorry for the missing XPath.vala file, this is a recurrent error I have (you know that). I uploaded XPath.vala updated with my changes; if you have any comment, file a bug and we can work on.

Great job!!!

License changes:
https://git.gnome.org/browse/gxml/commit/?id=66270bf75332b5ba052cfc9859148d42981e63fa

Missing files:
https://git.gnome.org/browse/gxml/commit/?id=579af9bbad3e3b3664350846fd0658b042ff34ad

PD. May you want to help to add test cases for your XPath implementation Bug #772194