[Bug 3315] [XqueryX] spurious "as" in typeswitch clause with no variable

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3315





------- Comment #2 from jim.melton@acm.org  2006-06-06 00:31 -------
Upon further analysis of the problem, which is very real, I am not so certain
about your proposed solution.  Here's why:

First, the suggestion to use xqx:sequenceType instead of xqx:typeDeclaration
sounds good, as it brings XQueryX into alignment with XQuery.  One (intended)
artifact of that change would be that, in the stylesheet, xqx:typeDeclaration
outputs the "as" and xqx:sequenceType does not. 

But the problem is that the "as" must be output whenever there is an
xqx:variableBinding present in the xqx:typeswitchExprCaseClause.  That means
that the stylesheet must be changed so that xqx:variableBinding emits the "as"
when, and only when, it appears in an xqx:typeswitchExprCaseClause
(specifically, not when it appears in an xqx:typeswitchExprDefaultClause). 

I have made a proposal to the XML Query WG to resolve this bug with one change
to the schema and two changes to the stylesheet. 

Received on Tuesday, 6 June 2006 00:31:57 UTC