[xml] XML Schema mixed content patch



Hi,

attached is a patch that makes XML Schema in libxml2 allow non-empty cdata for mixed complex content.

That is it will validate
 <my>xx</my>

when the following XML schema is used

<element name='my'>
 <complexType mixed='true'>
 </complexType>
</element>

Adam Dickmeiss,
 Index Data

Index: xmlschemas.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/xmlschemas.c,v
retrieving revision 1.51
diff -r1.51 xmlschemas.c
3583a3584
    const xmlChar *mixed;
3604a3606,3610

    mixed = xmlSchemaGetProp(ctxt, node, "mixed");
    if (mixed != NULL)
      type->flags |= XML_SCHEMAS_TYPE_MIXED;

4493a4500,4503

                        if (typeDecl->flags & XML_SCHEMAS_TYPE_MIXED)
                            typeDecl->contentType =
                                XML_SCHEMA_CONTENT_MIXED;
4513a4524,4526
                        if (typeDecl->flags & XML_SCHEMAS_TYPE_MIXED)
                            typeDecl->contentType =
                                XML_SCHEMA_CONTENT_MIXED;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]