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 29895 - [XP31] Prepublication check of XP31: Examples
Summary: [XP31] Prepublication check of XP31: Examples
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-04 08:34 UTC by Michael Kay
Modified: 2016-11-01 20:01 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2016-10-04 08:34:11 UTC
(1) In 3.1.5.1 Example: Partial Application of an Anonymous Function, the expression is not valid XPath. XPath does not allow multiple let clauses. 

(2) Ditto in 3.1.5.1 Example: Derived Types and Non-local Variable Bindings

Rewrite as

let $incr := 1,
    $f := function ($i as xs:decimal) as xs:decimal { $i + $incr }
return $f(5)

(3) In 3.1.5.3 Function coercion, the example is XQuery-only (search for "declare function")

(4) In 3.1.5.3 the example starting "let $m := map {..." has multiple let clauses.


I confined my testing to code tagged with @role='parse-test'. There are many more examples that could usefully have this attribute.
Comment 1 Michael Kay 2016-10-04 08:56:31 UTC
Note, I committed the stylesheet used for testing these examples as xquery-31/style/run-xpath-parse-tests.xsl - it requires XSLT 3.0.