* xmlSchemaAddModelGroup: * @ctxt: a schema parser context * @schema: the schema being built * @type: the "compositor" type of the model group * @node: the node in the schema doc * * Adds a schema model group * *WARNING* this interface is highly subject to change * * Returns the new structure or NULL in case of error */
| 5421 | * Returns the new structure or NULL in case of error |
| 5422 | */ |
| 5423 | static xmlSchemaModelGroupPtr |
| 5424 | xmlSchemaAddModelGroup(xmlSchemaParserCtxtPtr ctxt, |
| 5425 | xmlSchemaPtr schema, |
| 5426 | xmlSchemaTypeType type, |
| 5427 | xmlNodePtr node) |
| 5428 | { |
| 5429 | xmlSchemaModelGroupPtr ret = NULL; |
| 5430 | |
| 5431 | if ((ctxt == NULL) || (schema == NULL)) |
| 5432 | return (NULL); |
| 5433 | |
| 5434 | ret = (xmlSchemaModelGroupPtr) |
| 5435 | xmlMalloc(sizeof(xmlSchemaModelGroup)); |
| 5436 | if (ret == NULL) { |
| 5437 | xmlSchemaPErrMemory(ctxt); |
| 5438 | return (NULL); |
| 5439 | } |
| 5440 | memset(ret, 0, sizeof(xmlSchemaModelGroup)); |
| 5441 | ret->type = type; |
| 5442 | ret->node = node; |
| 5443 | WXS_ADD_LOCAL(ctxt, ret); |
| 5444 | if ((type == XML_SCHEMA_TYPE_SEQUENCE) || |
| 5445 | (type == XML_SCHEMA_TYPE_CHOICE)) |
| 5446 | WXS_ADD_PENDING(ctxt, ret); |
| 5447 | return (ret); |
| 5448 | } |
| 5449 | |
| 5450 | |
| 5451 | /** |
no test coverage detected