I have the same problem and am currently doing the same thing, store
all .xq and xml files in file system for versioning and then
bulk-import them into eXist.
I do not like this approach at all. It's a pain.
Last year I had tried using davfs to 'mount' an eXist collection, then
svn checkout into the davfs mount. That did not work because eXist did
not like document/collection names beginning with '.' (or maybe it was
some other problem, either way it did not work).
My latest thought was creating a vfs driver for bazaar that would talk
to eXist using xmlrpc or REST and allow it to be versioned, but I
haven't gotten around to trying it.
Versioning is a problem for us, and it's not just a matter of having a
history of changes, it needs to fit in with the system used by the rest
of the code base (subversion or bazaar at the moment).
I had the same problem with Zope's ZODB and managed to get around that
by using Shane Hathaways (now unsupported) Ape product. Not ideal, but
Andrew Welch wrote:
Here's what we do....we keep all our code (XQuery/XSLT) and data (config files, images, xml documents, etc.) in a
separate directory structure, which is under SVN control and versioning. We have an Ant build script (build.xml) which
uses eXist ant tasks to selectively deploy all the SVN versioned artefacts (code and data) directly to our eXist server
instance, with a single command.
I'm now approaching this problem myself - all xquery and xslt files
are stored in the database, but I really need to have them under
version control (svn).
Brad Clements, email@example.com (315)268-1000