Re: [xml] xml Schema : question about element content type
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: veillard redhat com, fabrice guy gmail com
- Cc: xml gnome org
- Subject: Re: [xml] xml Schema : question about element content type
- Date: Thu, 17 Mar 2005 13:50:51 +0100
Hi,
Daniel Veillard wrote:
On Thu, Mar 17, 2005 at 10:59:49AM +0100, GUY Fabrice wrote:
Hi,
I'm using libxml2-2.6.18 (and test case provided with it) and have
some question about element content type in xml Schemas:
- if I try testSchemas --debug empty_0.xsd then the content of both
complex type are empty which seems OK
- but if I try testSchemas --debug empty_1.xsd then the content of the
complex type is mixed : I'm wondering why this content is not empty.
It was a bug: if using the short-hand form as in "empty_1.xsd", the
content type "mixed" was incorrectly inherited from the base type
"anyType" .
Fixed in CVS, xmlschemas.c rev 1.119:
testSchemas --debug test/schemas/empty_1.xsd
Schemas: no name, no target namespace
Type: #CT1 [complex] content: [empty]
Element (global): internationalPrice
I can't comment on this,
Reading the code to try to understand I have found
(xmlschemas.c:13261) a potential bug : if (base->contentType =
XML_SCHEMA_CONTENT_MIXED) instead of : if (base->contentType ==
XML_SCHEMA_CONTENT_MIXED). I corrected this line, recompiled, but the
problem still exist.
This didn't change anything for you, since the code is #IFDEFed together
with some other functions to be used to compute and restrict complex
types in the future; it will substitute some of the current code and add
additional constraints, which are still missing for complex types.
that definitely looks like a typo bug, fixed in CVS, thanks !
Regards & thanks for the report,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]