W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2007

[Bug 4248] Static typing of K2-DocumentURIFunc-10

From: <bugzilla@wiggum.w3.org>
Date: Sat, 20 Jan 2007 12:24:55 +0000
To: public-qt-comments@w3.org
Message-Id: <E1H8FHD-0006tx-Ue@wiggum.w3.org>


------- Comment #2 from frans.englich@telia.com  2007-01-20 12:24 -------
Doesn't the [1]-predicate ensure a more precise cardinality is inferred? Formal
Semantics, 4.3.2 Filter Expressions reads:

"When a predicate with a numeric literal or the last() expression is applied on
a primary expression, it is normalized using the fn:subsequence function. This
results in a more precise static type for those cases."

7.2.13 The fn:subsequence function, reads:
"The fn:subsequence function has special static typing rules when its second
argument is the numeric literal value 1 or the built-in variable $fs:last.
These rules provide better typing for path expressions such as Expr[1] and

Therefore, I currently guess that the mentioned tests doesn't have
cardinality-related errors.

However, I think K2-StartsWithFunc-1 to 6 and K2-EndsWithFunc-1 to 6 should
fail type check nevertheless because the declared type of the variable, doesn't
match its operand:

declare variable $vA as xs:string := ("B STRING", current-time(),
Received on Saturday, 20 January 2007 12:25:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:32 UTC