<?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>29088</bug_id>
          
          <creation_ts>2015-08-27 08:38:25 +0000</creation_ts>
          <short_desc>[xslt 3.0] visibility=&quot;abstract&quot; on xsl:expose</short_desc>
          <delta_ts>2015-10-29 12: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>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>122787</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-27 08:38:25 +0000</bug_when>
    <thetext>It&apos;s an error to specify visibility=&quot;abstract&quot; on a template, function, variable, or attribute set unless the body of the component is empty.

There&apos;s no similar rule when a component is declared as abstract on xsl:expose. Should there be? Or should the body just be ignored?

(It&apos;s not so much an issue with xsl:accept because you can only accept something as abstract if it is already abstract in the used package.)

A slightly orthogonal point: for xsl:template we say

If the visibility attribute is present with the value abstract then (a) the sequence constructor defining the template body must be empty: that is, the only permitted children are xsl:context-item and xsl:param, and (b) there must be no match attribute.

I wonder if (b) is too strict: should it say: &quot;(b) there must be a name attribute&quot;. Visibility is only relevant to named templates, but if we allow the template to have both a name and a match pattern, I don&apos;t see why we shouldn&apos;t allow the visibility attribute to define its visibility when used as a named template, rather than requiring the visibility to be specified in a separate xsl:expose declaration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122788</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-27 08:48:45 +0000</bug_when>
    <thetext>While we&apos;re about it, there are a couple of places where the spec talks about a component having &lt;code&gt;visibility=&quot;abstract&quot;&lt;/code&gt; which ought to be generalized to allow the visibility of the component to be abstract by virtue of xsl:expose rather than by an explicit visibility attribute.

Examples found in the definition of error [ERR XTSE3075], and in the second para of 3.5.3.6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122790</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-27 10:23:45 +0000</bug_when>
    <thetext>Also note, section 3.5.3.1 on xsl:expose says &quot;The visibility of a component declared within a package is the first of the following that applies&quot; but these rules only apply to function, variable, template, attribute-set, and mode declarations - not to other components such as accumulators, keys, and params. Specifically, the default for xsl:param is not private as these rules would indicate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123062</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-09-03 17:23:20 +0000</bug_when>
    <thetext>In discussion we felt that it would be useful to add a rule that xsl:expose can assign visibility=&quot;abstract&quot; to a component only if the component is already declared with visibility=&quot;abstract&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123068</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-09-03 22:45:07 +0000</bug_when>
    <thetext>Proposed changes:

1. In 3.5.3.1 Visibility of Components add the rule:

If the *explicit exposed visibility* of a component is abstract, then the component must also have a *declared visibility* of abstract

and add a static error condition.

2. In 3.5.3.1 Visibility of Components change

&quot;The visibility of a component declared within a package is the first of the following that applies&quot;

to

&quot;The visibility of a named template, function, variable, attribute set, or mode declared within a package is the first of the following that applies&quot;

(The other issues mentioned in the bug are minor and editorial.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123078</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-09-04 11:42:54 +0000</bug_when>
    <thetext>The proposed rule (1) above isn&apos;t quite sufficient, because it doesn&apos;t address what happens with wildcards, e.g.

&lt;xsl:expose component=&quot;variable&quot; names=&quot;*&quot; visibility=&quot;abstract&quot;/&gt;

I think the rule should be re-stated (after the 5-item list) as:

It is not possible to expose a component as abstract unless its declaration specifies visibility=&quot;abstract&quot;. It is therefore a static error if the result of the above matching rules is to cause an xsl:expose declaration with visibility=&quot;abstract&quot; to match a component whose declaration does not have the attribute visibility=&quot;abstract&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123195</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-09-14 15:13:21 +0000</bug_when>
    <thetext>Although I don&apos;t have any formal indication that the proposal was accepted, I recall the discussion being favourably inclined, so I have applied to the changes to the spec, and leave the bug open so the WG can review them</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123628</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-09 11:18:05 +0000</bug_when>
    <thetext>The change was reviewed and approved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>