|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] flowrrr - how to structure a function?Wolfgang Meier wolfgang at exist-db.orgWed Oct 18 01:32:57 PDT 2006
> 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. This assumes that the XQuery is invoked by some Java code you have written yourself. But what if you don't know any Java and your application is actually an XQuery? I think this is quite common among our users. It is so easy to write all the web stuff in XQuery (with the help of some XSLT to post-process the output) and I would just be too lazy to go back to writing servlets or JSP pages (even our test runner for the XQTS is itself a web application written in XQuery). I agree that Robert's example, using a sequence of HTTP extension functions with unknown side effects, does call for a redesign. Most of those functions were added by users just as they needed them, so the package has to be cleaned up sometimes, maybe taking into account Martin's proposal. I like the idea of just returning an XML fragment to represent the HTTP response, then process that fragment after the query returned. Wolfgang
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






