This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
windowVars is optional in the two definitions that reference it: <xsd:complexType name="windowStartCondition"> <xsd:sequence> <xsd:element ref="windowVars" minOccurs="0"/> <xsd:element name="winStartExpr" type="exprWrapper"/> </xsd:sequence> </xsd:complexType> <xsd:element name="windowStartCondition" type="windowStartCondition"/> <xsd:complexType name="windowEndCondition"> <xsd:sequence> <xsd:element ref="windowVars" minOccurs="0"/> <xsd:element name="winEndExpr" type="exprWrapper"/> </xsd:sequence> <xsd:attribute name="onlyEnd" type="xsd:boolean" default="false"/> </xsd:complexType> <xsd:element name="windowEndCondition" type="windowEndCondition"/> 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: <windowStartCondition> <winStartExpr> . . . </winStartExpr> </windowStartCondition> and <windowStartCondition> <windowVars/> <winStartExpr> . . . </winStartExpr> </windowStartCondition> Perhaps the windowVars element should be required.
I, provisionally, disagree. In fact, it was just this consideration that caused the situation you reported in Bug 6310. I don't believe that a <windowVars> element should appear in a <windowStartCondition> or <windowEndCondition> element unless it has some content. Based on that philosophy, my initial design of the <windowVars> element required the "least optional" child, the <positionalVariableBinding> 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 <windowVars> element and one with no <windowVars> element. Instead of my immediately accepting the recommendation in this bug, I'd like more discussion of whether my original design was appropriate (meaning that a <windowVars> element should have a required child <positionalVariableBinding> element), or whether it's better to make the child <positionalVariableBinding> element optional in the <windowVars> element and then require the (possibly empty) <windowVars> child element in the <windowStartCondition> or <windowEndCondition> elements.
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 "windowVar"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.