From f896d44aac4e8a8e1bb60a0bbe8e8107ae2ba72c Mon Sep 17 00:00:00 2001 From: "Kasimier T. Buchcik" Date: Wed, 12 Jul 2006 15:18:08 +0000 Subject: [PATCH] Fixed bug #347316, reported by David Belius: The simple type, which was * xmlschemas.c: Fixed bug #347316, reported by David Belius: The simple type, which was the content type definition of a complex type, which in turn was the base type of a extending complex type, was missed to be set on this extending complex type in the derivation machinery. --- ChangeLog | 8 ++++++++ xmlschemas.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index c106b4d8..490a0eb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Jul 12 17:13:03 CEST 2006 Kasimier Buchcik + + * xmlschemas.c: Fixed bug #347316, reported by David Belius: + The simple type, which was the content type definition + of a complex type, which in turn was the base type of a + extending complex type, was missed to be set on this + extending complex type in the derivation machinery. + Mon Jul 3 13:36:43 CEST 2006 Kasimier Buchcik * xpath.c: Changed xmlXPathCollectAndTest() to use diff --git a/xmlschemas.c b/xmlschemas.c index ff89e2cc..859bdd87 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -18287,10 +18287,18 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) { /* * SPEC (3.2.1) + * "If the ·effective content· is empty, then the + * {content type} of the [...] base ..." */ type->contentType = baseType->contentType; type->subtypes = baseType->subtypes; /* + * Fixes bug #347316: + * This is the case when the base type has a simple + * type definition as content. + */ + type->contentTypeDef = baseType->contentTypeDef; + /* * NOTE that the effective mixed is ignored here. */ } else if (baseType->contentType == XML_SCHEMA_CONTENT_EMPTY) {