logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

RE: flowrrr - how to structure a function?: msg#00046

Subject: RE: flowrrr - how to structure a function?
> 
> 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.

Michael Kay   



<Prev in Thread] Current Thread [Next in Thread>