[xquery-talk] flowrrr - how to structure a function?
mhk at mhk.me.uk
Tue Oct 17 23:26:13 PDT 2006
> What is the recommended way to connect to the results of an
> XQuery statement and something that can make side effects in
> an efficient/realistic way?
If the aim of your query is to produce the response to an HTTP request, then
I would construct the result tree in the body of the query, and then
serialize the output as XML or XHTML to write the response. Or in a more
complex scenario I would write a pipeline in which the query gets the
necessary data from the database or elsewhere, and then passes it to an XSLT
transformation for formatting.
I can see that it's tempting in this situation to use extension functions to
set the HTTP headers, but I would resist that. Better to do this from the
application (written in Java or whatever) that invokes the query.
More information about the talk