[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.com
Thu Oct 19 09:32:27 PDT 2006


  flowrrr - how to structure a function?
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.