|
[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?Martin Probst martin at x-hive.comThu Oct 19 09:32:27 PDT 2006
Hi, > That's the kind of use case that the scripting extension of XQuery > (XQueryP) that Jonathan was mentioning here is supposed to solve. > > This is not an isolated use case, that's a more and more frequent use > case scenario, and the current XQuery 1.0, nor the Update spec do > no good for it. I think it should be possible to rewrite those functions in a way that makes them if not side-effect free at least idempotent. If you then have later functions depend on input values from earlier functions you should be safe. E.g. session:invalidate() should be session:invalidate($session-token) and session:begin() should return that $session-token. I'd say it's probably worth the effort. > The scripting extension of XQuery should help though, it applies the > side-effects right away and guarantees a deterministic evaluation > order > for subexpressions with side-effects (among other things). I'm not sure it's possible to do so in every use case, and especially if it's also elegant to do so, so there might be a case for XQueryP. Regards, Martin -- Martin Probst X-Hive Corporation http://x-query.com/mailman/listinfo/talk
|
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
|






