On Tue, Nov 23, 2010 at 11:18 AM, Christian GrĂ¼n christian.gruen@gmail.com wrote:
Updating is no problem in XQuery functions: you'll have to add the "updating" specified to a function declaration:
declare updating function ... { ... };
Ah, I didn't know that. That solved a major headache for me, thank you.
P.S. extracting the xsl-stylesheet from the file-header from an XML file and then applying it to itself is a bit ugly, does anyone know if there is a (JAXP) way to get an XML file with its stylesheet already applied automagically?
Maybe this won't be necessary anymore..
Well, I already made an XSLT that selects the function-declarations and prefixes them to the queries that use them. Even with just a few functions this already greatly reduces the size of the queries.
And I'll need it anyway because I plan to use XQuery as a sort of programming language, where the XML database is the (persistent) memory. And like in a normal computer, the memory contains both the data and the instructions. But since programming in XQuery is very cumbersome, I plan to have much simpler languages that will be translated into XQuery using XSLT.
Mark Boon
A.I. Software Engineer at Avatar Reality