FOTS: validate returns [zerr:ZXQP0003]: internal error

Bug #1073964 reported by Sorin Marian Nasoi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Cezar Andrei

Bug Description

xquery version '3.0';

declare namespace op = 'http://www.zorba-xquery.com/options/features';
declare namespace f = 'http://www.zorba-xquery.com/features';
declare option op:enable 'f:hof';

xs:integer(validate type xs:decimal {<a>93.7</a>})

Tags: fots

Related branches

Changed in zorba:
importance: Medium → High
Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

The following expression is wrong: validate type xs:decimal {<a>93.7</a>}, because 'a' element can't have the type xs:decimal, only it's content can be xs;decimal.

To make validate do the validation of the content of the element <a> be decimal use the following code:

xquery version '3.0';

declare namespace op = 'http://www.zorba-xquery.com/options/features';
declare namespace f = 'http://www.zorba-xquery.com/features';
declare option op:enable 'f:hof';

xs:integer(validate lax {<a xsi:type="xs:decimal" xmlns:xs="http://www.w3.org/2001/XMLSchema" >93.7</a>})

The fact that the original script raises an internal error is still a bug.

Changed in zorba:
status: New → Fix Committed
Changed in zorba:
milestone: 2.8 → 2.9
Changed in zorba:
status: Fix Committed → Fix Released
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.