I'm using saxon 8.9 with the command line:
java net.sf.saxon.Query query
I have over 50 xquery files again the same big xml
file and now they are called independently.
Is there a way to load the big xml file first into
memory and run the several xquery files one by one?
That'll save some running times by loading the doc
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
From: Michael Kay <mike@sa...> - 2008-02-15 22:19:13
> I have over 50 xquery files again the same big xml file and
> now they are called independently.
> Is there a way to load the big xml file first into memory and
> run the several xquery files one by one?
> That'll save some running times by loading the doc once.
Sure you can do this - but only from the Java API, not from the command
line. There's an outline of the APIs available at
I'd suggest using the S9API interfaces which are new in Saxon 9.0,
In your case you do steps 1 and 2 (creating a processor and building a
source document) and probably 3 (creating a query compiler) once, and then
you do steps 4,5,6 (compiling and running a query) as often as you need to,
once for each query.
There are working examples in the saxon-resourcesNN.zip file, which is a
Get latest updates about Open Source Projects, Conferences and News.