Re:CDuce: XML-oriented functional language
by Finnucane on Sunday November 24, 2019 @08:34PM
(#21624792)
I sometimes use Basex as an XSLT/Xquery processor from Python. It is possible to do this with Saxon, but it is little easier to use Basex. Maybe someday we'll get proper Python bindings for Saxon-C, but last I looked, it hadn't been done.
> I actually spent the last week looking for something like XPath done right
Have you tried XQuery? XQuery is a superset of XPath, currently (like XPath as well) at version 3.1. There is three major processors:
- eXist-db (much more than just an XQuery processor, but I believe, it can be used stand-alone)
- Saxon (only the PE/EE editions (commercial) implement current standards, SaxonHE, however, should fully support XQuery 1.0 (which is based on XPath2)
- BaseX (my favorite) Can be used as stand-alone, in REPL mode, behind a webserver (Jetty, Tomcat), or a very easy to use and simple but powerful IDE, and is extremly well done. Simple install.
Of course, this is just a small glimpse on this language, which can be typed or not, just as you prefer (I prototype untyped, then increase typing incrementally and release fully typed). It is a functional application programming language, that does great as backend, REST is supported and so much more. Just a glimpse on the build-in functions of BaseX (these are in addition to the XPath 3.1 function catalog, which has approx. 200 functions, now) http://docs.basex.org/wiki/Module_Library