<?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>29094</bug_id>
          
          <creation_ts>2015-08-28 08:32:30 +0000</creation_ts>
          <short_desc>[xslt 3.0] conflict between xsl:accept and xsl:override</short_desc>
          <delta_ts>2015-10-29 12:42:31 +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>
          <cc>abel.braaksma</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>122832</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-28 08:32:30 +0000</bug_when>
    <thetext>Consider:

&lt;xsl:use-package name=&quot;Q&quot;&gt;
  &lt;xsl:accept component=&quot;variable&quot; name=&quot;v&quot; visibility=&quot;hidden&quot;/&gt;
  &lt;xsl:override&gt;
    &lt;xsl:variable name=&quot;v&quot; select=&quot;93.7&quot;/&gt;
  &lt;/xsl:override&gt;
&lt;/xsl:use-package&gt;

The current spec suggests that the xsl:override wins (xsl:accept says &quot;In the absence of a matching xsl:override element ...) and essentially assigns no semantics to the xsl:accept declaration in this case.

I think it would be consistent with the decision on bug #26781 to raise an error in the case where xsl:accept names a component explicitly (not by wildcard) and there is an xsl:override for the same component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123363</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-09-30 02:19:19 +0000</bug_when>
    <thetext>An alternative thought is: the user wants to hide this component from his current stylesheet (principal package), but override the value for the used package. Which I think is a valid thought in and of itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123601</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-07 21:06:36 +0000</bug_when>
    <thetext>Comment #1 suggests a possible interpretation of my example, but I think if we wanted to provide that particular capability it would make more sense to do so by allowing the declaration within xsl:override to specify visibility=&quot;hidden&quot;. But that&apos;s new functionality that I think we can live without. I therefore propose the rule:

It is a static error if a token in the names attribute of an xsl:accept element, other than a wildcard, matches the symbolic name of a component declared within an xsl:override element that is a sibling of the xsl:accept element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123630</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-09 11:32:57 +0000</bug_when>
    <thetext>The WG accepted the proposed change. New text added as follows:

&lt;item diff=&quot;add&quot; at=&quot;S-bug29094&quot;&gt;
    &lt;p&gt;If a component is explicitly accepted from a used package (by name, rather
        than by a matching wildcard, and if the same component is the subject
        of an &lt;elcode&gt;xsl:override&lt;/elcode&gt; declaration, then a static error
        occurs (see below). There is no conflict, however, if a component declared
        within &lt;elcode&gt;xsl:override&lt;/elcode&gt; also matches a wildcard in an &lt;elcode&gt;xsl:accept&lt;/elcode&gt;
        element.&lt;/p&gt;
    &lt;p&gt;
        &lt;error spec=&quot;XT&quot; type=&quot;static&quot; class=&quot;SE&quot; code=&quot;3051&quot;&gt;
            &lt;p&gt;It is a &lt;termref def=&quot;dt-static-error&quot;&gt;static error&lt;/termref&gt; if
                a token in the &lt;code&gt;names&lt;/code&gt; attribute of &lt;elcode&gt;xsl:accept&lt;/elcode&gt;,
                other than a wildcard, matches the symbolic name of a component declared
                within an &lt;elcode&gt;xsl:override&lt;/elcode&gt; child of the same
                &lt;elcode&gt;xsl:use-package&lt;/elcode&gt; element.&lt;/p&gt;
        &lt;/error&gt;
    &lt;/p&gt;
&lt;/item&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>