<?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>24200</bug_id>
          
          <creation_ts>2014-01-03 13:08:35 +0000</creation_ts>
          <short_desc>&apos;&quot;as&quot; SequenceType&apos; vs &apos;TypeDeclaration&apos; in XPath/XQuery 3.0?</short_desc>
          <delta_ts>2014-01-07 18:36:27 +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>XPath 3.0</component>
          <version>Proposed Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tony Graham">tgraham</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jmdyck</cc>
    
    <cc>mike</cc>
          
          <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>97962</commentid>
    <comment_count>0</comment_count>
    <who name="Tony Graham">tgraham</who>
    <bug_when>2014-01-03 13:08:35 +0000</bug_when>
    <thetext>Is it an omission that in XPath 3.0 [1], &apos;&quot;as&quot; SequenceType&apos; appears in production [64] whereas &apos;TypeDeclaration&apos; appears in production [3], where &apos;TypeDeclaration&apos; is defined as &apos;&quot;as&quot; SequenceType&apos; in production [66]?

[64] InlineFunctionExpr ::= &quot;function&quot; &quot;(&quot; ParamList? &quot;)&quot; (&quot;as&quot;
SequenceType)? FunctionBody
[2] ParamList ::= Param (&quot;,&quot; Param)*
[3] Param ::= &quot;$&quot; EQName TypeDeclaration?
[66] TypeDeclaration ::= &quot;as&quot; SequenceType

XQuery 3.0 [2] similarly uses &apos;&quot;as&quot; SequenceType&apos; in its production [165] while making rather more uses of &apos;TypeDeclaration&apos; in other productions.

[1] http://www.w3.org/TR/xpath-30/
[2] http://www.w3.org/TR/xquery-30/#id-inline-func
[3] http://www.w3.org/TR/xpath-30/#prod-xpath30-Param
[64] http://www.w3.org/TR/xpath-30/#prod-xpath30-InlineFunctionExpr
[66] http://www.w3.org/TR/xpath-30/#prod-xpath30-TypeDeclaration
[165] http://www.w3.org/TR/xquery-30/#prod-xquery30-InlineFunctionExpr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98090</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2014-01-07 16:39:39 +0000</bug_when>
    <thetext>This is editorial. While I agree that it would be nice to make the two specs editorially consistent in the names of productions, the grammars are equivalent, and I would rather not change the grammar in a PR.

I propose to fix this in 3.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98092</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-01-07 17:05:06 +0000</bug_when>
    <thetext>(Jonathan perhaps failed to make it clear that his response is given after WG discussion and decision. The machinery for generating the grammars used in our specs is quite complex and refactoring can have unexpected consequences, so we felt that this change was too high risk to make at this stage of the game).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98098</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2014-01-07 18:36:27 +0000</bug_when>
    <thetext>It looks like we use &apos;TypeDeclaration&apos; when specifying the type of a variable or parameter, and &apos;as SequenceType&apos; when specifying the return type of a function or function-type. I think it would look somewhat odd (possibly confusing) to replace &apos;as SequenceType&apos; with &apos;TypeDeclaration&apos; in the latter productions.

So, to answer the initial question, I suspect it&apos;s not an omission (or oversight) that &apos;TypeDeclaration&apos; isn&apos;t used everywhere it could be. And I&apos;m inclined to think it doesn&apos;t need &quot;fixing&quot; in 3.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>