This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8409 - WS Q2 - Scripting Expression in LET
Summary: WS Q2 - Scripting Expression in LET
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Scripting Extensions 3.0 Requirements and Use Cases (show other bugs)
Version: Working drafts
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: John Snelson
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-01 13:25 UTC by Peter M. Fischer
Modified: 2010-01-18 22:26 UTC (History)
0 users

See Also:


Attachments

Description Peter M. Fischer 2009-12-01 13:25:26 UTC
In the main document, 2.4.2 "FLWOR Expressions" states that let (for, where, ...) must contain either simple or updating expressions.

In the Use Case "WS" - XQuery for Web Services, Q2 defines a sequential function local:check-user-and-log($username as xs:string).

This function is used in a FLWOR expression in the main query:

let $user := replace($request/url, "^http://.*/([^/]+)/add$", "$1")
let $blog := local:check-user-and-log($user)
return ( ....

If my understanding is right and the semantics have not changed from what is currently stated in the documents, I'd suggest moving these two variables into a block, where variable initializers might be sequential expressions.
Comment 1 John Snelson 2010-01-06 16:06:28 UTC
Hi Peter,

Thanks for your comments - that's definitely a bug in the published use cases. However the expression category rules will change again in the next working draft, and I believe this use case will become legal.

John
Comment 2 John Snelson 2010-01-12 17:36:49 UTC
The XQuery WG discussed this on January 12th, and agreed that this bug has already been rendered moot by changes yet to be published in the XQuery SX specification.

If you agree with this resolution, please go ahead and close this bug.