<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>8409</bug_id>
          
          <creation_ts>2009-12-01 13:25:26 +0000</creation_ts>
          <short_desc>WS Q2 - Scripting Expression in LET</short_desc>
          <delta_ts>2010-01-18 22:26:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Scripting Extensions 3.0 Requirements and Use Cases</component>
          <version>Working drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter M. Fischer">peter.fischer</reporter>
          <assigned_to name="John Snelson">john.snelson</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29859</commentid>
    <comment_count>0</comment_count>
    <who name="Peter M. Fischer">peter.fischer</who>
    <bug_when>2009-12-01 13:25:26 +0000</bug_when>
    <thetext>In the main document, 2.4.2 &quot;FLWOR Expressions&quot; states that let (for, where, ...) must contain either simple or updating expressions.

In the Use Case &quot;WS&quot; - 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, &quot;^http://.*/([^/]+)/add$&quot;, &quot;$1&quot;)
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&apos;d suggest moving these two variables into a block, where variable initializers might be sequential expressions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30677</commentid>
    <comment_count>1</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2010-01-06 16:06:28 +0000</bug_when>
    <thetext>Hi Peter,

Thanks for your comments - that&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30988</commentid>
    <comment_count>2</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2010-01-12 17:36:49 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>