FOTS: validate returns [zerr:ZXQP0003]: internal error
Bug #1073964 reported by
Sorin Marian Nasoi
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://
declare namespace f = 'http://
declare option op:enable 'f:hof';
xs:integer(validate type xs:decimal {<a>93.7</a>})
Related branches
lp:~zorba-coders/zorba/bug1073964-valInternalError
- Sorin Marian Nasoi: Approve
- Cezar Andrei: Approve
-
Diff: 1231 lines (+185/-175)1 file modifiedsrc/types/schema/XercSchemaValidator.cpp (+185/-175)
Changed in zorba: | |
importance: | Medium → High |
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.
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'; www.zorba- xquery. com/features';
declare namespace f = 'http://
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.