<?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>29675</bug_id>
          
          <creation_ts>2016-05-27 20:45:23 +0000</creation_ts>
          <short_desc>[XSLT30] Determining the static context item type when focus-setting container is a declaration</short_desc>
          <delta_ts>2016-10-06 18:42:26 +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>XSLT 3.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</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>126623</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-05-27 20:45:23 +0000</bug_when>
    <thetext>We currently write, in section 19.2 Determining the Context Item Type:

5. If the focus-setting container is any other declaration, for example a global variable declaration, the context item type is U{*}.

However, the present rules on streamability for global variables assume the context item type from xsl:global-context-item.

Even though we may be dropping global variables from streaming analysis (see bug 29670 comment #3), I think this rule should be in relation to xsl:global-context-item (regardless whether streamability is applicable).

I propose therefore:

5. If the focus-setting container is a global xsl:variable or xsl:param declaration, the context item type is the type from the type attribute of xsl:global-context-item, U{} if the use attribute is &quot;absent&quot; or U{*} if that declaration is absent.
6. If the focus-setting container is any other declaration, for example xsl:key or xsl:accumulator, the context item type is U{*}.
7. Otherwise [...]

(rule (6) is there because they apply to the match selection, not the GCI)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126658</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-06-02 20:20:52 +0000</bug_when>
    <thetext>I agree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126718</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-06-09 22:07:52 +0000</bug_when>
    <thetext>These changes were agreed and have been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>