diff options
author | Remi Gacogne <rgacogne-xml@coredump.fr> | 2012-05-11 15:31:05 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-05-11 15:31:05 +0800 |
commit | 4609e6c980b256e4115d4b7e1227f59870465995 (patch) | |
tree | 1ffa005f813b492430f6680562a316782cf38d89 /xmlschemas.c | |
parent | 39d027cdb74371d64f68dc488556be41e1d14546 (diff) | |
download | android_external_libxml2-4609e6c980b256e4115d4b7e1227f59870465995.tar.gz android_external_libxml2-4609e6c980b256e4115d4b7e1227f59870465995.tar.bz2 android_external_libxml2-4609e6c980b256e4115d4b7e1227f59870465995.zip |
XSD: optional element in complex type extension
For https://bugzilla.gnome.org/show_bug.cgi?id=609796
Libxml2 fails to validate an instance document against a schema if an element
whose type is a complex extension of some base type with an optional child
element and that child element is not specified in the instance document. For
example, suppose I have some complex type BaseType that is defined to have one
child element in a sequence group that has minOccurs set to 0
Diffstat (limited to 'xmlschemas.c')
-rw-r--r-- | xmlschemas.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlschemas.c b/xmlschemas.c index 5a5b41ec..2fb21511 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -18476,8 +18476,8 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, particle->children->children = (xmlSchemaTreeItemPtr) xmlSchemaAddParticle(pctxt, type->node, - ((xmlSchemaParticlePtr) type->subtypes)->minOccurs, - ((xmlSchemaParticlePtr) type->subtypes)->maxOccurs); + ((xmlSchemaParticlePtr) baseType->subtypes)->minOccurs, + ((xmlSchemaParticlePtr) baseType->subtypes)->maxOccurs); if (particle->children->children == NULL) goto exit_failure; particle = (xmlSchemaParticlePtr) |