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 29111 - Incorrect example in section default case
Summary: Incorrect example in section default case
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 Requirements and Use Cases (show other bugs)
Version: Working drafts
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
Depends on:
Reported: 2015-09-04 13:22 UTC by O'Neil Delpratt
Modified: 2015-10-09 08:35 UTC (History)
0 users

See Also:


Description O'Neil Delpratt 2015-09-04 13:22:07 UTC
The example in section incorrectly has the keyword 'case' after 'default'. See below:

declare function local:play(
  $secret-number as xs:integer,
  $guessed-number as xs:integer,
  $translator as function(xs:string) as xs:string)
  switch (true())
  case $guessed-number eq $secret-number
    return $translator("You won!")
  case $guessed-number lt $secret-number
    return $translator("The secret number is greater.")
  default case (: $guessed-number gt $secret-number :)
    return $translator("The secret number is lower.")
Comment 1 Jonathan Robie 2015-10-08 21:55:35 UTC
I just committed a fix.