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

[Bug 28836] fn:parse-json, fallback function

From: <bugzilla@jessica.w3.org>
Date: Tue, 23 Jun 2015 09:21:50 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28836-523-zpMkSRgWe1@http.www.w3.org/Bugs/Public/>

--- Comment #2 from Christian Gruen <christian.gruen@gmail.com> ---
I see. Yes, sounds absolutely reasonable.

In that case, it could make sense not to return FOJS0005, but the actual error
caused by function coercion. Otherwise, it could be difficult for an
implementation to decide if an error was caused by the function signature or by
the processed data:

Currently, I would expect this expression to yield FOJS0005:

  json-to-xml('"\uFFFF"', map { 'fallback':
    function($s) as xs:integer { 1 }

And I would expect this expression to yield XPTY0004:

  json-to-xml('"\uFFFF"', map { 'fallback':
    function($s) as xs:string { 1 }

Maybe it would be safer to raise XPTY0004 in all cases?

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 23 June 2015 09:21:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:54 UTC