edit_xml XPath version

17 views
Skip to first unread message

Geoff Gibbs

unread,
Sep 15, 2016, 9:18:10 AM9/15/16
to help-cfengine
Can anyone tell me which version of XPath is used by edit_xml bundles?

Aleksey Tsalolikhin

unread,
Sep 16, 2016, 12:39:28 PM9/16/16
to Geoff Gibbs, help-cfengine
On Thu, Sep 15, 2016 at 6:18 AM, Geoff Gibbs <geoff...@diamond.ac.uk> wrote:
Can anyone tell me which version of XPath is used by edit_xml bundles?


Dear Geoff,

The short answer is: XPath 1.0.

Here is how I got that answer:

CFEngine uses libxml2 for the XML functionality provided by edit_xml bundles:

root@tashkent:~# cf-agent -V
CFEngine Core 3.7.3
CFEngine Enterprise 3.7.3
root@tashkent:~# ldd `which cf-agent`|grep  xml
libxml2.so.2 => /var/cfengine/lib/libxml2.so.2 (0x00007fba412b9000)
root@tashkent:~# 

So, what version of XPath does libxml2 support?

According to StackOverflow, libxml2 does not yet support XPath 2.0:

Latest libxml2 source code from ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz contains xpath.c which begins with:


/*
 * xpath.c: XML Path Language implementation
 *          XPath is a language for addressing parts of an XML document,
 *          designed to be used by both XSLT and XPointer
 *
 * Reference: W3C Recommendation 16 November 1999


XML Path Language (XPath)

Version 1.0

W3C Recommendation 16 November 1999, revised 7 September 2015

Hope this helps!

Best,
Aleksey

-- 
Need training on CFEngine, Git or Time Management?  Email trai...@verticalsysadmin.com.

Geoff Gibbs

unread,
Sep 17, 2016, 9:20:11 AM9/17/16
to Aleksey Tsalolikhin, Geoff Gibbs, help-cfengine

Unfortunate. But thank you.


--
You received this message because you are subscribed to a topic in the Google Groups "help-cfengine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/help-cfengine/5hL7SjTMYoQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.

Aleksey Tsalolikhin

unread,
Sep 17, 2016, 3:37:13 PM9/17/16
to Geoff Gibbs, Geoff Gibbs, help-cfengine

You are welcome, Geoff.  :-)


Unfortunate. But thank you.


To unsubscribe from this group and all its topics, send an email to help-cfengine+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages