<?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>29242</bug_id>
          
          <creation_ts>2015-10-26 09:37:13 +0000</creation_ts>
          <short_desc>Overriding a required parameter with an optional parameter</short_desc>
          <delta_ts>2015-10-30 15:38:04 +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>123945</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-26 09:37:13 +0000</bug_when>
    <thetext>In 3.5.3.3, the compatibility rules for overriding of variables and parameters state:

If the overridden variable is a parameter that specifies required=&quot;yes&quot; then the overriding variable is either a non-parameter variable, or a parameter that specifies required=&quot;yes&quot;

This rule seems unnecessary and illogical. It essentially says that variables can override parameters, and parameters can override variables, in all cases except the following: an optional parameter cannot override a required parameter.

But an optional parameter always supplies a default, so why not? As written, if a library package has a required parameter LINE_LENGTH, then I can override this with a variable LINE_LENGTH set to 80, but I cannot override it with an optional parameter LINE_LENGTH whose default is 80.

In addition the terminology &apos;required=&quot;yes&quot;&apos; is wrong. If we make the rule for explicitly required parameters then it should also apply to implicitly required parameters.

Proposal: delete this rule.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123947</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-26 10:45:38 +0000</bug_when>
    <thetext>In case anyone needs convincing, the current rules allow me to override a required parameter with a variable, and then to override the variable with an optional parameter, so I can do it in two steps but can&apos;t do it in one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124011</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-30 12:39:43 +0000</bug_when>
    <thetext>The WG accepted this change. (Though time was short and one member expressed an intent to study the problem further and push back if problems were found).

The change has been applied to the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>