[xquery-talk] SequenceType matching in For/Some/Every expressions
mrys at microsoft.com
Wed Sep 28 09:01:44 PDT 2005
I would recommend that you file this as an error report at the W3C
Bugzilla site at http://www.w3.org/Bugs/Public/ right now.
> -----Original Message-----
> From: talk-bounces at xquery.com
> [mailto:talk-bounces at xquery.com] On Behalf Of Martin Probst
> Sent: Wednesday, September 28, 2005 7:01 AM
> To: talk at xquery.com
> Subject: [xquery-talk] SequenceType matching in
> For/Some/Every expressions
> I think there is a (somewhat minor) bug in the XQuery specification
> about sequence type matching. The grammar states:
>  ForClause ::= <"for" "$"> VarName
> TypeDeclaration? ...
>  TypeDeclaration ::= "as" SequenceType
>  SequenceType ::= (ItemType OccurrenceIndicator?)
> | <"empty-sequence" "(" ")">
> and similar rules for Some, Every and Let. I think these rules should
> rather reference/descend directly into ItemType as the following
> statements do not make any sense to me (same for some&every):
> for $x as xs:string* in ...
> for $x as xs:string+ in ...
> for $x as xs:string? in ...
> for $x as empty-sequence() in ...
> The only thing that adds any semantic meaning is the empty-sequence()
> statement which I would interpret as "give an error if this yields
> something". But it's really cryptic and there are better ways to do
> Am I missing something or is this an issue? The description
> for for/let
> clauses doesn't mention occurrences at all.
> Martin Probst
> X-Hive Corporation
> talk at xquery.com
More information about the talk