This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4757 - 1.0.3dev:K2-Axes-53
Summary: 1.0.3dev:K2-Axes-53
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 12:25 UTC by Tim Mills
Modified: 2007-07-02 12:51 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-06-26 12:25:28 UTC
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"
Comment 1 Michael Dyck 2007-06-26 20:01:53 UTC
(In reply to comment #0)
> 
> shouldn't this always throw a type checking error,

Isn't that what the Test Suite expects (XPTY0019)?
Comment 2 Frans Englich 2007-06-27 07:44:37 UTC
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.
Comment 3 Tim Mills 2007-07-02 12:51:46 UTC
Yes.  You're right.