zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #08128
[Bug 925366] Re: Setting a prefixed default value for an attribute typed as xs:QName makes zorba crash.
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";
validate { <element xmlns='http://www.example.com/'></element> }
There is this error:
$ ./bin/zorba -f -q ../../../xqSample/prefixedDefaultValue/q.xq
<?xml version="1.0" encoding="UTF-8"?>
</media/sdd/dev/repo/bug925366-prefixDefaultValue/build/../../../xqSample/prefixedDefaultValue/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-prefixDefaultValue/src/types/schema/SchemaValidatorFilter.cpp:1590
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/925366
Title:
Setting a prefixed default value for an attribute typed as xs:QName
makes zorba crash.
Status in Zorba - The XQuery Processor:
New
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://www.w3.org/2001/XMLSchema"
xmlns:my="http://ns.example.com/"
targetNamespace="http://www.example.com/">
<xs:element name="element">
<xs:complexType>
<xs:attribute name="type-name" type="xs:QName" default="my:default-value"/>
</xs:complexType>
</xs:element>
</xs:schema>
Query
=====
import schema namespace pul = "http://www.example.com/" at "schema.xsd";
()
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).
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/925366/+subscriptions
References