[xquery-talk] Linking Saxon through to exist database

Dave Pawson dave.pawson at gmail.com
Sat Jan 24 16:24:51 PST 2009


2009/1/24 Andrew Welch <andrew.j.welch at gmail.com>:
>> My simple logic.
>> Saxon provides an xquery interface.
>> Why can't I use the two together?
>
> It would need to know about eXist's underlying data model, how to use
> its indexes etc

OK, makes sense. Tks



>> It did work with the exist REST interface.... can you
>> explain a bit better what you mean by treating exist
>> as a filestore? ... What else is exist?
>
> ok, for example you have 10,000 xml file of 1mb each stored in eXist -
> if each doc had a <title> element you could get all of them by doing
>
> //title
>
> and this would be very fast as eXist has indexed all the elements etc.
>
> If you were using Saxon and going through the REST interface you would
> have to either:
>
> - get each individual document through say the doc() function (so the
> xml may as well just be on your filesystem)
>
> - write a query in eXist that gets all the title elements and returns
> well-formed xml, and then hit that with the doc() function from Saxon.
>  This is good, however eXist will build and serialise the intermediate
> tree which Saxon will then reparse... (and you also have to code to
> that intermediate tree rather than the data itself)
>
>
>> Sounds like I'm missing another api into exist?
>> The "smart" one?
>
> Just write your xquery in eXist... I'd only use Saxon for XSLT 2.0

OK. Thanks Andrew.

Next question, how to use emacs and a cli interface to exist.
I'll go poke about.

TTFN Saxon.


regards



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk


More information about the talk mailing list