<?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>27125</bug_id>
          
          <creation_ts>2014-10-22 14:11:51 +0000</creation_ts>
          <short_desc>[XSLT30] Rules of override-extension-functions and xsl:override</short_desc>
          <delta_ts>2014-10-24 14:05:16 +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>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>normal</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>113569</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-10-22 14:11:51 +0000</bug_when>
    <thetext>This is a bug report that covers the unresolved part of https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Sep/0036.html and https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Sep/0039.html (member only) and related mail discussion.

Summary of that part:

The XSLT30 LCWD (Oct 2014) says that when you override an xsl:function and that function has override-extension-functions=&quot;no&quot;, then the overriding function must also specify override-extension-functions=&quot;no&quot;.

Use-case summary:

Package A:
&lt;xsl:function name=&quot;exsl:random-sequence&quot; 
    override-extension-functions=&quot;no&quot;&gt;
    &lt;!--
       custom implementation, but if exsl:random-sequence (EXSLT.org)
       is supported, then processor should use internal version
     --&gt;
&lt;/xsl:function&gt;

Package B:
&lt;xsl:override&gt;
    &lt;xsl:function name=&quot;exsl:random-sequence&quot; 
       override-extension-functions=&quot;yes&quot;&gt;
       &lt;!-- 
          User wants to make use of the new fn:random-sequence of XP31
          implementation using XPath 3.1 random sequence
        --&gt;
    &lt;/xsl:function&gt;
&lt;/xsl:override&gt;

Result:
[ERR XTSE3070] It is a static error if the signature of an overriding component is not compatible with the signature of the component that it is overriding.

Relevant spec part:

Definition of &quot;compability&quot;: https://www.w3.org/XML/Group/qtspecs/specifications/xslt-30/html/Overview-diff.html#dt-compatible (member only), item 4 of the second bullet:

&lt;quote&gt;
If the overridden function specifies override-extension-functions=&quot;no&quot; (or the equivalent using the deprecated override attribute) then the overriding function also specifies override-extension-functions=&quot;no&quot; (or the equivalent).
&lt;/quote&gt;

Proposed solution:

Remove this rule (not the error), because it limits users choosing to switch to (new) internal XPath 3.1 or later, or XSLT 3.x or later functions as a preference over internal implementations and as such, limits extensibility and more importantly, inter-processor compatibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113699</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-10-24 14:01:17 +0000</bug_when>
    <thetext>The WG resolved to make the change.

Note, for the record, that the justification for introducing this rule was in bug #22878.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>