<?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>29226</bug_id>
          
          <creation_ts>2015-10-22 10:41:06 +0000</creation_ts>
          <short_desc>[xt30] Empty enclosed expressions</short_desc>
          <delta_ts>2015-11-05 21:25:10 +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>123840</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-22 10:41:06 +0000</bug_when>
    <thetext>XQuery has adopted a proposal to allow empty enclosed expressions, e.g.

&lt;a b=&quot;some { (:absent:) } content&quot;/&gt;

Should we do the same?

We don&apos;t define value templates using a grammar, so the change required would be in 5.6:

Change:

A variable part consists of an XPath expression enclosed in curly brackets ({}). 

to

A variable part consists of an optional XPath expression enclosed in curly brackets ({}). 

Change:

It is a static error if the string contained between matching curly brackets in a value template does not match the XPath production ExprXP30

to

It is a static error if the string contained between matching curly brackets in a value template does not match the XPath production ExprXP30? (that is, an expression or nothing)

Change:

The expansion of a variable part is obtained by evaluating the enclosed XPath expression and converting the resulting value to a string

to

The expansion of a variable part is obtained as follows:

* If the variable part contains an expression, [current text]

* Otherwise, the result is a zero-length string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123859</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-10-22 19:24:53 +0000</bug_when>
    <thetext>I assume you mean to allow this for dynamic AVT&apos;s, static AVT&apos;s and TVT&apos;s?

I think it is a good thing. If I want to temporarily disable an expression, I have to wrap it now into smiley comments and add a &quot;()&quot; (empty sequence) expression to it, which is annoying (but by no means unsurpassable).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123861</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-10-22 19:29:12 +0000</bug_when>
    <thetext>&gt; It is a static error if the string contained between matching curly brackets 
&gt; in a value template does not match the XPath production ExprXP30? (that is, 
&gt; an expression or nothing)

We may need to be explicit about whitespace; &quot;nothing&quot; is too broad (or narrow). For XPath whitespace is clearly defined, but we now say &quot;optional XPath expression&quot;, so we must be clear about what it is when it is not an XPath expression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124009</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-30 12:31:54 +0000</bug_when>
    <thetext>The changes were accepted, and have been applied to the spec (in a way that answers the questions raised in comments on this bug). The bug remains open to allow the WG to review and approve the changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124107</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-11-05 18:43:41 +0000</bug_when>
    <thetext>The change was approved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>