[ANN] eXist XProc step library

As an experiment in creating a reusable library in pure XProc, I've
written a set of steps for managing an eXist XML database from a
client — loading resources, extracting resources, querying data, etc.
— similar to the eXist Ant tasks:

http://bitbucket.org/jasulak/exist-xproc-library/wiki/Home

(Note that this is a different and smaller project than James Fuller's
xprocxq, which is a full XProc implementation written in XQuery and
run from within eXist.)

It won't win any prizes for speed, but I've found it useful.  It includes:

 - ex:store
 - ex:remove
 - ex:create
 - ex:list
 - ex:copy
 - ex:move
 - ex:xquery
 - ex:extract

Comments, suggestions, etc. are welcome.  There's not much non-trivial
XProc code in the wild, so any thoughts about its interfaces or
general XProc "best practices" (or this library's lack thereof) would
be interesting.

I've only tested it with Calabash.  It uses XPath 2.0 functions, so (I
think) it won't work with Calumet.

A few quick XProc observations:

 - p:string-replace can be ... frustrating at times.  I always want
its xpath context to be different than it is.  I ended up writing my
own step to do Ant-like variable replacement inside of XML
(<wxp:resolve-placeholders/>), which might be interesting to some of
you separately from the library itself.

- I played a lot of the "Why is This Port Unbound?" game.  Better
error reporting would probably help, but it's an area that new users
might always find tricky.

-James

Received on Tuesday, 18 August 2009 17:49:03 UTC