1

We're running eXist-db version 3.0 and want to try running XProc within it.

We found that the XProcxq Module is now part of eXist: http://exist-db.org/exist/apps/doc/extensions.xml#module_xprocxq

However, in attempting to use it we get the error below and wondered if anyone had suggestions for where we could be going wrong?

As specified at the top of the module page linked to, we added the module to the conf.xml file and restarted eXist. (This could be where we went wrong, but that's a guess on our part)

This is what the module we added looks like in conf.xml:

<module uri="http://xproc.net/xproc" class="org.exist.xquery.modules.xprocxq.XProcxq/>

Here is the simple started XQuery I've attempted to use:

xquery version "1.0" encoding "UTF-8";

import module namespace const = "http://xproc.net/xproc/const";
import module namespace xproc = "http://xproc.net/xproc";
import module namespace u = "http://xproc.net/xproc/util";

declare variable $local:XPROCXQ_EXAMPLES := "/db/examples"; (:CHANGE ME:)  

let $stdin :=document{<test>Hello World</test>}

let $pipeline :=document{
                    <p:pipeline name="pipeline"
                                xmlns:p="http://www.w3.org/ns/xproc"
                                xmlns:c="http://www.w3.org/ns/xproc-step">
                        <p:identity/>
                    </p:pipeline>
                }

return
     xproc:run($pipeline,$stdin)

Here is the error: error found while loading module xproc: IO exception while loading module 'http://xproc.net/xproc' from 'http://xproc.net/xproc'

zrdunlap
  • 177
  • 2
  • 12

3 Answers3

3

I posed your question to the exist-open mailing list (where I'd encourage you to join for future eXist-db questions), and it appears XProc support in eXist is currently between a rock and a hard place. The xprocxq library you mentioned is woefully underdeveloped (abandoned by its original creator), and the much better developed Calabash module is incompatible with the current version of Saxon used in eXist, due to a dependency on that version of Saxon. I'd welcome you to join exist-open to discuss further. Perhaps there's some other workaround for you.

Joe Wicentowski
  • 5,159
  • 16
  • 26
  • Thanks very much, I did join the list and posted my question. Norm Walsh reached out to my co-worker and we have filed a feature/bug (forget which) request to include FTP support. – zrdunlap Oct 01 '15 at 13:49
  • Great, hopefully we can work out a solution soon. Looking forward to hearing more about your other requests and your project. – Joe Wicentowski Oct 01 '15 at 13:53
3

It needs to be rebuilt.

According to http://exist-db.org/exist/apps/wiki/blogs/eXist/eXist30RC1

EXPath packages that incorporate Java libraries may no longer work with eXist 3.0 and may need to be recompiled for our API changes; packages should now explicitly specify the eXist versions that they are compatible with.

I am working on the update to the XProc EXPath module.

Loren Cahlander
  • 1,257
  • 1
  • 10
  • 24
  • Thanks for this, I'll keep and eye on updates to the EXPath module, appreciate the feedback. – zrdunlap Oct 01 '15 at 13:51
  • I am still struggling with the same error. Could it help to download the RC01 version of eXist again? I run this version but uninstalling and reinstalling of the module does not help. As for building—I am not so skilled for that and have no time for reading tons of docs at the moment. Is there any other way how to make that work? – Honza Hejzl Apr 04 '16 at 08:08
3

The XMLCalabash module for eXist has now been rebuilt for a newer version of eXist and Calabash and should work with eXist 3.0.RC1.

To build your own Jar package for eXist 3.0.RC1 run:

$ git clone https://github.com/eXist-db/eXist-XMLCalabash.git
$ cd eXist-XMLCalabash
$ rm -rf src/test
$ mvn package

The Jar is then in the target/ folder. You should copy it to $EXIST_HOME/lib/user modify $EXIST_HOME/conf.xml to load the module and then restart eXist.

Updated

The XML Calabash module for eXist, now also has a PR so that it will support the upcoming eXist 3.0.RC2 - https://github.com/eXist-db/eXist-XMLCalabash/pull/2

However you cannot built it remotely until eXist 3.0.RC2 is released.

adamretter
  • 3,885
  • 2
  • 23
  • 43
  • Thanks for for letting us know! Will see about upgrading and testing things out. – zrdunlap Oct 20 '15 at 18:35
  • I am running eXist 3.0RC1, have just installed the packege XProc (0.1.6) through the package manager but the same error persists. Is there any deeper information regarding using XProc in eXist, please? The documentation is very poor at the moment. – Honza Hejzl Feb 10 '16 at 14:55
  • @HonzaHejzl How about if you build the code for the XProc module yourself? – adamretter Feb 10 '16 at 17:44
  • @adamretter, at the moment, I don't know whether I am skilled enough for this. If you could give me a hint, I would be happy. – Honza Hejzl Feb 11 '16 at 10:01
  • @adamretter, for a newbie, it is even unclear how to install the Calabash module. The XProc module in the public repository seems to be the old _xprocx_ plugin for exist-db 2.2. Could you provide a hint how to install the latest Calabash in 3.0RC1, please? – Honza Hejzl Mar 18 '16 at 09:42
  • @HonzaHejzl you would need to install Maven and then run `mvn package` on the source code for the XML-Calabash module – adamretter Mar 22 '16 at 16:26
  • @adamretter, if you were interested, [here](ftp://46.28.111.241/mvn-calabash.log) is the log of unsuccessful building of the last snapshot from GitHub. I would be really happy if I could work with XProc in eXist. It would help me with many many functions I can’t easily mimic in eXist itself. – Honza Hejzl Apr 20 '16 at 11:51
  • @HonzaHejzl I just updated my answer above, should hopefully solve the issue for you. – adamretter Apr 20 '16 at 15:42
  • Thanks. The interesting thing is the build is successful but in the target folder there is `XMLCalabash-0.1.7-SNAPSHOT.jar` only. It seems I really have to wait. – Honza Hejzl Apr 21 '16 at 07:13
  • I updated my comment above telling you what to do with the Jar – adamretter Apr 21 '16 at 19:23