zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #12294
[Bug 1025193] [NEW] no error reporting in converters/html module
Public bug reported:
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:
in file src/com/zorba-
xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
createHtmlItem(...) doesn't throw a proper error message (discovered by
ghislain) which makes debugging really hard. In contrast, parse-xml
throws a very helpful error:
dynamic error [err:FODC0006]: invalid content passed to fn:parse-
xml(): loader parsing error: Char 0xD83D out of allowed range;
Could html:parse report the same error?
(not sure if chiller is you, chris?)
** Affects: zorba
Importance: Undecided
Assignee: Chris Hillery (ceejatec)
Status: New
** Tags: improve-code-quality incorrect-result usability
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025193
Title:
no error reporting in converters/html module
Status in Zorba - The XQuery Processor:
New
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:
in file src/com/zorba-
xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
createHtmlItem(...) doesn't throw a proper error message (discovered
by ghislain) which makes debugging really hard. In contrast, parse-xml
throws a very helpful error:
dynamic error [err:FODC0006]: invalid content passed to fn:parse-
xml(): loader parsing error: Char 0xD83D out of allowed range;
Could html:parse report the same error?
(not sure if chiller is you, chris?)
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025193/+subscriptions
Follow ups
References