<?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>29067</bug_id>
          
          <creation_ts>2015-08-19 19:27:07 +0000</creation_ts>
          <short_desc>[xslt 3.0] declared-modes should allow reference to a mode from a used package</short_desc>
          <delta_ts>2015-08-21 19:47:01 +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>Last Call drafts</version>
          <rep_platform>PC</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="Michael Kay">mike</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>122678</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-19 19:27:07 +0000</bug_when>
    <thetext>Section 3.5.4.1 states:

&lt;quote&gt;
The declared-modes attribute of xsl:package determines whether or not modes that are referenced within the package must be explicitly declared. If the value is yes (the default), then it is an error to use a mode name in xsl:template or xsl:apply-templates, or in the [xsl:]default-mode attribute of any element, or to use the unnamed mode explicitly or implicitly in these contexts, unless the package contains an explicit xsl:mode declaration for that mode. If the value is no, then this is not an error.
&lt;/quote&gt;

A superficial reading suggests that you can&apos;t write &lt;xsl:apply-templates mode=&quot;M&quot;/&gt; where M is a public mode declared in a used package. That would be nonsense. The description of XTSE3085 a couple of paragraphs later gets it right. 

Change &quot;unless the package contains an explicit xsl:mode declaration for that mode&quot; to &quot;unless the package either contains an explicit xsl:mode declaration for that mode, or contains a mode with the appropriate symbolic name and visibility that is exposed by a used package&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122708</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-21 18:23:21 +0000</bug_when>
    <thetext>The WG agreed to the proposed change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122709</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-21 19:47:01 +0000</bug_when>
    <thetext>The change has been applied</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>