W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2006

[Bug 3305] Cardinality +/* on range variables

From: <bugzilla@wiggum.w3.org>
Date: Wed, 31 May 2006 13:54:09 +0000
To: public-qt-comments@w3.org
Message-Id: <E1FlR9F-0001e1-Dl@wiggum.w3.org>


------- Comment #1 from davidc@nag.co.uk  2006-05-31 13:54 -------
I think the spec is fairly clear at present that the type applies to the
variable (ie to each individual item in a for clause) so saxon (and xq2xsl)
have (currently) the correct interpretation.

3.8.1 says:

...Each variable bound in a for or let clause may have an optional type
declaration, which is a type declared using the syntax in 2.5.3 SequenceType
Syntax. If the type of a value bound to the variable does not match the
declared type... 

The change to instead type the sequence would as you point out be more
expressive as it would give sensible meanings for the cardinality indicators,
but if that change were made I think the position of the as clause would need
to move

for $i in (1,2,3) as xs:integer*

so that "as" keeps its role of  separating the value and the type.

Received on Wednesday, 31 May 2006 13:54:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:12 UTC