In 4.3.2 Filter Expressions the rule [PrimaryExpr PredicateList [ fn:last() ]]Expr == let $fs:sequence := [PrimaryExpr PredicateList]Expr return fn:subsequence($fs:sequence, $fs:last,1) doesn't define fs:last. I suspect it should be: [PrimaryExpr PredicateList [ fn:last() ]]Expr == let $fs:sequence := [PrimaryExpr PredicateList]Expr return let $fs:last := fn:count($fs:sequence) return fn:subsequence($fs:sequence, $fs:last,1)
Yup, I agree.
Today, the Working Group approved your suggested change, so it will eventually appear in the FS errata document, and also be reflected in subsequent versions of the FS document. Consequently, I am marking this issue as RESOLVED FIXED. Please CLOSE the issue to indicate your acceptance of this resolution.
Thanks.
This issue has been entered as FS erratum E019, and the suggested change has been committed to the source files for the next edition of the FS document.