all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* XPATH queries and manipulation in guile?
@ 2017-04-23 17:10 Hartmut Goebel
  2017-04-24  8:55 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Hartmut Goebel @ 2017-04-23 17:10 UTC (permalink / raw)
  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 –
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

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: XPATH queries and manipulation in guile?
  2017-04-23 17:10 XPATH queries and manipulation in guile? Hartmut Goebel
@ 2017-04-24  8:55 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2017-04-24  8:55 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: Guix-devel

On Sun 23 Apr 2017 19:10, Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> 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.

The documentation is indeed terrible.  This library is used by other
Schemes; we should see if we can steal their docs, if they are better.

However it's possible to use SXPath with the string syntax.  I seem to
recall there's code out there to do that.  We could incorporate into
Guile to just support the standard syntax.  I think the way forward here
is to improve Guile's sxpath documentation, fixing whatever interfaces
are needed, and adding the xpath->selector function.

Andy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-24  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-23 17:10 XPATH queries and manipulation in guile? Hartmut Goebel
2017-04-24  8:55 ` Andy Wingo

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.