<?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>24378</bug_id>
          
          <creation_ts>2014-01-23 22:56:07 +0000</creation_ts>
          <short_desc>[XSLT30] xsl:on-empty on more instructions</short_desc>
          <delta_ts>2014-07-27 19:08:08 +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>
          <cc>cmsmcq</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>98964</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-01-23 22:56:07 +0000</bug_when>
    <thetext>This was briefly mentioned in [1] and discussed earlier at the July 11, 2013 telcon [2]. The idea was to extend xsl:on-empty at least to all node-construction instructions for reasons of usability and orthogonality. 

Other conclusions from that mail:

(a) the expression in the on-empty attribute must be type-consistent with the instruction it appears on. For example, on an LRE the on-empty expression must return an element or nothing.

(b) specifically on xsl:copy, the condition should be based on the emptyness of the constructed element/document, not the emptiness of the selected element/document

This is also relevant to related bugs bug-24142 and bug-24140.

[1] https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Jan/0004.html
[2] https://lists.w3.org/Archives/Member/w3c-xsl-wg/2013Jul/0060.html (minutes)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100171</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2014-02-10 16:25:57 +0000</bug_when>
    <thetext>We discussed this issue at the Prague face to face.

On consideration, our inclination was not to extend on-empty to further elements, but indeed to cut it back from some places which allow it now.

The current semantics of on-empty for xsl:copy make it mean different things in different cases, which is confusing to some WG members and potentially problematic for implementors.

We discussed a proposal to allow on-empty only in cases where the node being constructed can have children (is an element or a document node).  One WG member found the semantics on xsl:copy confusing enough that he wanted to eliminate it there and allow it only on literal result elements, xsl:element, and xsl:document (etc.)

We didn&apos;t feel we had a strong enough consensus to make a binding decision at the moment, though, given that the spec is in Last Call.  We may wish to come back to this on another day, earlier in the day.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109322</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-07-27 19:07:55 +0000</bug_when>
    <thetext>On 24 July 2014 the WG decided that the [xsl:]on-empty attribute should apply only to literal result elements, xsl:element, and xsl:copy, and that in the case of xsl:copy it should apply only when the node being copied is an element node.

The reasons for this are that (a) the major use cases for on-empty are concerned with construction of element nodes; (b) the concept of &quot;emptiness&quot; for elements and for nodes such as attributes is quite different, and overloading the concept gets messy, especially in the case of xsl:copy where the different meanings are mixed in one instruction.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>