From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: XPATH queries and manipulation in guile? Date: Sun, 23 Apr 2017 19:10:31 +0200 Message-ID: <3d31357c-7b67-cbe2-0f79-a8e76c8dc1c3@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2L1y-0007mt-MW for guix-devel@gnu.org; Sun, 23 Apr 2017 13:10:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2L1v-0001hM-Hp for guix-devel@gnu.org; Sun, 23 Apr 2017 13:10:38 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:46876) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2L1v-0001gZ-Be for guix-devel@gnu.org; Sun, 23 Apr 2017 13:10:35 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3w9ww94ZX6z1qql2 for ; Sun, 23 Apr 2017 19:10:33 +0200 (CEST) Received: from localhost (dynscan01.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3w9ww94LrZz3jgXv for ; Sun, 23 Apr 2017 19:10:33 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan01.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Y3ak0JNceoNI for ; Sun, 23 Apr 2017 19:10:32 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-46-244-138-38.dynamic.mnet-online.de [46.244.138.38]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sun, 23 Apr 2017 19:10:32 +0200 (CEST) Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id C4764602FC for ; Sun, 23 Apr 2017 19:18:10 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Guix-devel Hi, as far as I see it might be necessary to manipulate maven pom.xml files in many cases. Fedora provides macros like "pom_xpath_inject" or "%pom_remove_dep" for this [1, 2, 3]. Where can I find XPATH support for guile and some examples? Alternatively we could use Fedora's python-scripts [3] to do the job =E2=80= =93 ultimately showing that Python is superior to Java, since every Java package needs Python to build :-) Yes, I've seen SXPath [4], but IMHO this usign this would *not* be a good choice: It would require packages to learn yet another path language, while when using XPath, the packagers could simply copy expressions from some fedora .spec-file. Additionally I find the documentation of SXpath hard to understand - for be frank: I did not get it at all. [1] https://fedora-java.github.io/howto/snapshot/index.html#mvn_macros [2] https://pagure.io/javapackages/blob/master/f/macros.d/macros.fjava [3] https://pagure.io/javapackages/blob/master/f/java-utils [4] https://www.gnu.org/software/guile/manual/html_node/SXPath.html --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |