<?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>29802</bug_id>
          
          <creation_ts>2016-09-02 14:34:37 +0000</creation_ts>
          <short_desc>[XSLT30] (largely editorial) The description of the initial value for global parameters seems too narrow</short_desc>
          <delta_ts>2016-09-03 22:14:22 +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>RESOLVED</bug_status>
          <resolution>FIXED</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="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>127271</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-02 14:34:37 +0000</bug_when>
    <thetext>The definition for the global context item describes how it is applicable to global variables (section 2.3.2 Priming a stylesheet):

&quot;[Definition: An item that acts as the global context item for the transformation. This item is accessible as the initial value of the XPath expressions . (dot) and self::node() appearing within the select expression or sequence constructor of a global variable declaration within the top-level package, as described in 5.3.3.1 Maintaining Position: the Focus. ]&quot;

(Editorial: also note the excessive space at the end.)

This suggests that &quot;this item&quot; it not accessible in other ways. But suppose you have &lt;xsl:variable name=&quot;x&quot; select=&quot;/&quot; /&gt;, or &lt;xsl:variable name=&quot;y&quot; select=&quot;foo&quot; /&gt;. It should also be applicable to such expressions. The global context item does not need to be a (rooted) node.

I propose therefore to change it perhaps like this:

&quot;[Definition: An item that acts as the *global context item* for the transformation. This item acts as the initial *focus* for the select expression or sequence constructor of a *global variable* declaration within the *top-level* package, as described in 5.3.3.1 Maintaining Position: the Focus.]&quot;

Also editorial in this section: &quot;If the initialization of any global variables or parameter depends&quot; &gt;&gt; &quot;...any global variables or parameters...&quot; (missing &quot;s&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127273</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-02 15:16:45 +0000</bug_when>
    <thetext>In the section on call-template invocation (2.3.4) we use a different way to describe the initial focus of template declarations. Perhaps we could borrow from that?

It says:

&quot;The initial named template is evaluated with a singleton focus based on this context item if it exists, or with an absent focus otherwise.&quot;

Which could be applied to our definition something like this:

&quot;[Definition: An item that acts as the *global context item* for the transformation. *Global variables* are evaluated with a *singleton focus* based on the global context item, or with absent focus if it is absent.]&quot;

Note that this section (2.3.2), while it describes the process of priming the stylesheet and the definition of the global context item, does not mention that it is also used for the aforementioned initial named template.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127290</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-03 22:14:22 +0000</bug_when>
    <thetext>I have changed the text to:

&lt;p&gt;&lt;termdef id=&quot;dt-global-context-item&quot; term=&quot;global context item&quot;&gt;&lt;phrase
   diff=&quot;chg&quot; at=&quot;R-bug24764&quot;&gt;An item that acts as the &lt;term&gt;global
    context item&lt;/term&gt; for the transformation.&lt;/phrase&gt; This item acts
  as the &lt;termref def=&quot;dt-context-item&quot;/&gt; when evaluating
   &lt;phrase diff=&quot;chg&quot; at=&quot;R-bug24549&quot;&gt; the
   &lt;code&gt;select&lt;/code&gt; expression or sequence constructor of a
  &lt;termref def=&quot;dt-global-variable&quot;/&gt; declaration&lt;/phrase&gt;
  &lt;phrase diff=&quot;add&quot; at=&quot;R-bug25611&quot;&gt;within the &lt;termref
   def=&quot;dt-top-level-package&quot;/&gt;&lt;/phrase&gt;, as described in &lt;specref
   ref=&quot;focus&quot;/&gt;. The global context item may also be available in a named template
    when the stylesheet is invoked as described in &lt;specref ref=&quot;invoking-initial-template&quot;/&gt;&lt;/termdef&gt;.&lt;/p&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>