<?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>6311</bug_id>
          
          <creation_ts>2008-12-15 01:47:46 +0000</creation_ts>
          <short_desc>[XQX11] wndowVars is optional in the XQueryX 1.1 schema</short_desc>
          <delta_ts>2009-03-12 20:11:35 +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>XQueryX 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Jim Melton">jim.melton</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>22759</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2008-12-15 01:47:46 +0000</bug_when>
    <thetext>windowVars is optional in the two definitions that reference it:

  &lt;xsd:complexType name=&quot;windowStartCondition&quot;&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element ref=&quot;windowVars&quot; minOccurs=&quot;0&quot;/&gt;
      &lt;xsd:element name=&quot;winStartExpr&quot; type=&quot;exprWrapper&quot;/&gt;
    &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;

  &lt;xsd:element name=&quot;windowStartCondition&quot; type=&quot;windowStartCondition&quot;/&gt;

  &lt;xsd:complexType name=&quot;windowEndCondition&quot;&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element ref=&quot;windowVars&quot; minOccurs=&quot;0&quot;/&gt;
      &lt;xsd:element name=&quot;winEndExpr&quot; type=&quot;exprWrapper&quot;/&gt;
    &lt;/xsd:sequence&gt;
    &lt;xsd:attribute name=&quot;onlyEnd&quot; type=&quot;xsd:boolean&quot; default=&quot;false&quot;/&gt;
  &lt;/xsd:complexType&gt;

  &lt;xsd:element name=&quot;windowEndCondition&quot; type=&quot;windowEndCondition&quot;/&gt;

The elements in windowVars should all be optional themselves (Bug #6310).

This means that an empty list of window variables can be written two ways:

&lt;windowStartCondition&gt;
   &lt;winStartExpr&gt;
      .
      .
      .
   &lt;/winStartExpr&gt;
&lt;/windowStartCondition&gt;

and

&lt;windowStartCondition&gt;
   &lt;windowVars/&gt;
   &lt;winStartExpr&gt;
      .
      .
      .
   &lt;/winStartExpr&gt;
&lt;/windowStartCondition&gt;


Perhaps the windowVars element should be required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23021</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2009-01-13 01:20:35 +0000</bug_when>
    <thetext>I, provisionally, disagree.  In fact, it was just this consideration that caused the situation you reported in Bug 6310.  I don&apos;t believe that a &lt;windowVars&gt; element should appear in a &lt;windowStartCondition&gt; or &lt;windowEndCondition&gt; element unless it has some content. Based on that philosophy, my initial design of the &lt;windowVars&gt; element required the &quot;least optional&quot; child, the &lt;positionalVariableBinding&gt; element. 

However, by accepting your proposed change for Bug 6310, we have introduced the situation in which an empty list of window variables has two representations, one with an empty &lt;windowVars&gt; element and one with no &lt;windowVars&gt; element. 

Instead of my immediately accepting the recommendation in this bug, I&apos;d like more discussion of whether my original design was appropriate (meaning that a &lt;windowVars&gt; element should have a required child &lt;positionalVariableBinding&gt; element), or whether it&apos;s better to make the child &lt;positionalVariableBinding&gt; element optional in the &lt;windowVars&gt; element and then require the (possibly empty) &lt;windowVars&gt; child element in the &lt;windowStartCondition&gt; or &lt;windowEndCondition&gt; elements. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24087</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2009-03-06 19:30:08 +0000</bug_when>
    <thetext>The XML Query WG discussed this at its recent face-to-face meeting and concluded that there was no harm in providing two ways of representing an empty list of &quot;windowVar&quot;s, provided the XQueryX stylesheet generates the proper XQuery code. That generation has been confirmed, so we are marking this bug RESOLVED/INVALID.  If this is satisfactory to you, please mark it CLOSED. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>