diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2004-03-04 11:40:48 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2004-03-04 11:40:48 +0000 |
commit | 1aefc862f3bfb0f9bb4833b18d23bb7368c89dc7 (patch) | |
tree | 7aca211ab9e73fa1f960941aabfb32bedb5170a7 /xmlschemas.c | |
parent | 3411d08e3cc2976c186559fb52819b73cceb0507 (diff) | |
download | libxml2-1aefc862f3bfb0f9bb4833b18d23bb7368c89dc7.tar.gz |
applied patch from Adam Dickmeiss for mixed content added his regression
* xmlschemas.c: applied patch from Adam Dickmeiss for mixed content
* test/schemas/mixed* result/schemas/mixed*: added his regression
tests too.
Daniel
Diffstat (limited to 'xmlschemas.c')
-rw-r--r-- | xmlschemas.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmlschemas.c b/xmlschemas.c index f9e51533..2266f497 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -3581,6 +3581,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr child = NULL; const xmlChar *name; const xmlChar *oldcontainer; + const xmlChar *mixed; char buf[100]; if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) @@ -3602,6 +3603,11 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (type == NULL) { return (NULL); } + + mixed = xmlSchemaGetProp(ctxt, node, "mixed"); + if (mixed != NULL) + type->flags |= XML_SCHEMAS_TYPE_MIXED; + type->node = node; type->type = XML_SCHEMA_TYPE_COMPLEX; type->id = xmlSchemaGetProp(ctxt, node, "id"); @@ -4491,6 +4497,10 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr typeDecl, case XML_SCHEMA_TYPE_COMPLEX:{ if (typeDecl->subtypes == NULL) { typeDecl->contentType = XML_SCHEMA_CONTENT_EMPTY; + + if (typeDecl->flags & XML_SCHEMAS_TYPE_MIXED) + typeDecl->contentType = + XML_SCHEMA_CONTENT_MIXED; } else { if (typeDecl->flags & XML_SCHEMAS_TYPE_MIXED) typeDecl->contentType = @@ -4511,6 +4521,9 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr typeDecl, case XML_SCHEMA_TYPE_COMPLEX_CONTENT:{ if (typeDecl->subtypes == NULL) { typeDecl->contentType = XML_SCHEMA_CONTENT_EMPTY; + if (typeDecl->flags & XML_SCHEMAS_TYPE_MIXED) + typeDecl->contentType = + XML_SCHEMA_CONTENT_MIXED; } else { if (typeDecl->flags & XML_SCHEMAS_TYPE_MIXED) typeDecl->contentType = |