These functions are declared as taking an xs:string? as an argument. If
one is able to pass something like <a/> (which is not a string), then it
points to a bug elsewhere in the code, i.e., something should have
checked that the actual argument type doesn't match the declared
argument type -- right?  If so, that's not my code.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/920721

Title:
  json 2.0 bug: wrong behavior for parsing empty value

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Parsing an empty value has wrong behavior for both JSON mappings (Snelson and 
JSON-ML).
  Please see failing tests:
  - test/rbkt/zorba/json/json-snelson-empty-value
  - test/rbkt/zorba/json/json-jsonml-empty-value

  For instance in zorba/json/json-snelson-empty-value.xq:

  import module namespace json = 
"http://www.zorba-xquery.com/modules/converters/json";;
  json:parse(<a/>)

  Should raise error(s) http://www.zorba-xquery.com/errors:ZJPE0001
  But instead Zorba returns a result.

  
  For test/rbkt/zorba/json/json-jsonml-empty-value.xq:

  import module namespace json = 
"http://www.zorba-xquery.com/modules/converters/json";;
  let $options :=
    <options 
xmlns="http://www.zorba-xquery.com/modules/converters/json-options";>
      <json-format value="JsonML-array"/>
    </options>
  json:parse(<a/>,$options)

  Zorba returns http://www.w3.org/2005/xqt-errors:XPST0003
  instead of http://www.zorba-xquery.com/errors:ZJPE0001

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/920721/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to