Setting a prefixed default value for an attribute typed as xs:QName makes Zorba give an incorrect error.
Bug #925366 reported by
Ghislain Fourny
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Confirmed
|
Medium
|
Cezar Andrei |
Bug Description
Upon import of the following schema in a query, Zorba crashes.
schema.xsd
=========
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://
xmlns:my="http://
targetNamespace="http://
<xs:element name="element">
<xs:
<xs:attribute name="type-name" type="xs:QName" default=
</xs:
</xs:element>
</xs:schema>
Query
=====
import schema namespace pul = "http://
()
It seems to be because the prefix binding of "my" (the default value's prefix) is forgotten outside of the schema (removing this prefix does not lead to a crash).
Changed in zorba: | |
milestone: | none → 2.5 |
summary: |
Setting a prefixed default value for an attribute typed as xs:QName - makes zorba crash. + makes zorba give incorect error. |
Changed in zorba: | |
importance: | Medium → High |
milestone: | 2.5 → 2.7 |
summary: |
Setting a prefixed default value for an attribute typed as xs:QName - makes zorba give incorect error. + makes zorba give incorrect error. |
Changed in zorba: | |
milestone: | 2.7 → none |
milestone: | none → 2.7 |
Changed in zorba: | |
milestone: | 2.7 → 3.0 |
Changed in zorba: | |
milestone: | 3.0 → 2.8 |
Changed in zorba: | |
milestone: | 2.8 → 2.9 |
tags: | added: schema segfault |
tags: | removed: segfault |
Changed in zorba: | |
milestone: | 2.9 → 3.0 |
Changed in zorba: | |
status: | In Progress → Confirmed |
milestone: | 3.0 → none |
To post a comment you must log in.
There is no crash currently in the form that it is in the bug.
But if I modify to:
import schema namespace pul = "http:// www.example. com/" at "s.xsd"; www.example. com/'></element> }
validate { <element xmlns='http://
There is this error:
$ ./bin/zorba -f -q ../../. ./xqSample/ prefixedDefault Value/q. xq sdd/dev/ repo/bug925366-prefixDefaultV alue/build/ ../../. ./xqSample/ prefixedDefault Value/q. xq>:3,1: dynamic error [err:XQDY0027]: "Schema validation failed: undefined prefix in QName value 'my:default- value'" : unexpected validity property; raised at /home/cezar/ dev/repo/bug925366-prefixDefaultV alue/src/ types/schema/ SchemaValidator Filter. cpp:1590
<?xml version="1.0" encoding="UTF-8"?>
</media/