in module converters/html function parse returns empty sequence on error

Bug #1025194 reported by Dennis Knochenwefel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
New
Medium
Chris Hillery

Bug Description

Consider the following example Query:

  import module namespace json = "http://www.zorba-xquery.com/modules/converters/json";
  import module namespace html = "http://www.zorba-xquery.com/modules/converters/html";
  declare namespace j = "http://john.snelson.org.uk/parsing-json-into-xquery";
  let $text := "<p>" || json:parse("{""text"":""Let's get it. \ud83d\udc4a""}")/j:pair[@name="text"]/text() || "</p>"
  return html:parse($text)

Problem:

this query raises an error in file src/com/zorba-xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function createHtmlItem(...) and returns an empty sequence. Yet, html:parse () has return type document-node() (not document-node()?). Therefore, it is not allowed to return an empty-sequence.

(not sure if chiller is you, chris?)

description: updated
Changed in zorba:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.