W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2016

[Bug 29683] [FO31] Map lookup through function-call syntax does not explain what happens if the key does not exist

From: <bugzilla@jessica.w3.org>
Date: Thu, 02 Jun 2016 10:06:15 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29683-523-ljUkp6gZyT@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29683

--- Comment #1 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
Note, the example in FO31 section 17.5.3 fn:json-to-xml suggests that $m(x),
where $m is a map, should return the empty sequence. Checking this code was
what brought me to reporting this, as I had expected map:exists($c0chars,
$char) in there somewhere.

This rule is implied from the lines with $replacement in the code below:

    ....
       let 
         $c0chars := map {
           '\u0000':'[NUL]',
           '\u0001':'[SOH]',
           '\u0002':'[STX]',
           ...
           '\u001E':'[RS]',
           '\u001F':'[US]'
         },
         $replacement := $c0chars($char)
      return 
        if (exists($replacement))
    ....

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 2 June 2016 10:06:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:00 UTC