This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Since the FS spec states in 4.2 Path Expressions that: [RelativePathExpr / StepExpr]Expr == fs:apply-ordering-mode ( fs:distinct-doc-order-or-atomic-sequence ( let $fs:sequence as node()* := [RelativePathExpr]Expr return let $fs:last := fn:count($fs:sequence) return for $fs:dot at $fs:position in $fs:sequence return [StepExpr]Expr )) shouldn't this always throw a type checking error, because let $fs:sequence as node()* := (1, 2, 3)[1] return .... will fail? (:*******************************************************:) (: Test: K2-Axes-53 :) (: Written by: Frans Englich :) (: Date: 2007-06-14T10:15:26+01:00 :) (: Purpose: Many atomic values with predicates in a path expression. :) (:*******************************************************:) (1, 2, 3)[1]/(1, 2)[last()]/"a string"
(In reply to comment #0) > > shouldn't this always throw a type checking error, Isn't that what the Test Suite expects (XPTY0019)?
I agree it's a type error, but I think the type error maps to the error code XPTY0019 as opposed to XPTY0004, as Dyck points out. 3.2 Path Expressions in XQuery 1.0 reads: Expression E1 is evaluated, and if the result is not a (possibly empty) sequence of nodes, a type error is raised [err:XPTY0019]. With reservations for being enlightened on how FS (maybe) changes things here, I'm leaning towards resolving this report as invalid.
Yes. You're right.