Lines Matching refs:NULL

292 ( (WXS_CONSTRUCTOR((ctx))->buckets != NULL) && \
312 #define WXS_ILIST_IS_EMPTY(l) ((l == NULL) || ((l)->nbItems == 0))
317 ((node != NULL) && (node->ns != NULL) && \
321 #define FREE_AND_NULL(str) if ((str) != NULL) { xmlFree((xmlChar *) (str)); str = NULL; }
332 #define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0))
423 /* For chameleon includes, @origTargetNamespace will be NULL */
1228 return (NULL);
1252 return (NULL);
1258 return (NULL);
1260 return (NULL);
1268 return (NULL);
1281 * just "localName" if @namespaceName is NULL.
1283 * Returns the localName if @namespaceName is NULL, a formatted
1292 if (namespaceName != NULL) {
1297 if (localName != NULL) {
1298 if (namespaceName == NULL)
1302 *buf = xmlStrcat(*buf, BAD_CAST "(NULL)");
1310 if (ns != NULL)
1313 return (xmlSchemaFormatQName(buf, NULL, localName));
1337 if (WXS_ATTRUSE_DECL(item) != NULL) {
1341 return(NULL);
1352 return (NULL);
1393 if (WXS_ATTRUSE_DECL(item) != NULL) {
1397 /* TODO: Will returning NULL break something? */
1409 return (NULL);
1424 xmlChar *str = NULL;
1482 const xmlChar *value, *value2 = NULL;
1485 if ((retValue == NULL) || (val == NULL))
1488 *retValue = NULL;
1490 value = NULL;
1497 if (value != NULL) {
1502 if (value2 != NULL)
1508 if (value2 != NULL)
1514 if (*retValue == NULL)
1515 if (value == NULL) {
1520 else if (value != NULL) {
1527 } while (val != NULL);
1531 if (*retValue != NULL)
1533 if (value2 != NULL)
1552 * designation if the arguments are not NULL:
1553 * 1a. If itemDes not NULL -> itemDes
1554 * 1b. If (itemDes not NULL) and (itemName not NULL)
1556 * 2. If the preceding was NULL and (item not NULL) -> item
1557 * 3. If the preceding was NULL and (itemNode not NULL) -> itemNode
1570 xmlChar *str = NULL;
1573 if (*buf != NULL) {
1575 *buf = NULL;
1578 if (itemDes != NULL) {
1580 } else if (item != NULL) {
1640 if (WXS_ATTRUSE_DECL(ause) != NULL) {
1738 if ((named == 0) && (itemNode != NULL)) {
1746 if (elem->ns != NULL) {
1755 if ((itemNode != NULL) && (itemNode->type == XML_ATTRIBUTE_NODE)) {
1757 if (itemNode->ns != NULL) {
1785 xmlChar *value = NULL;
1788 if (*buf != NULL)
1790 *buf = NULL;
1797 for (facet = type->facets; facet != NULL; facet = facet->next) {
1807 if (*buf != NULL)
1809 *buf = NULL;
1810 return (NULL);
1812 if (*buf == NULL)
1818 if (value != NULL) {
1820 value = NULL;
1832 } while ((type != NULL) && (type->type != XML_SCHEMA_TYPE_BASIC));
1847 __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL,
1855 __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL,
1870 if (ctxt != NULL)
1872 __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, node, NULL,
1891 xmlGenericErrorFunc channel = NULL;
1892 xmlStructuredErrorFunc schannel = NULL;
1893 void *data = NULL;
1895 if (ctxt != NULL) {
1903 error, XML_ERR_ERROR, NULL, 0,
1904 (const char *) str1, (const char *) str2, NULL, 0, 0,
1925 if (child != NULL)
1957 xmlGenericErrorFunc channel = NULL;
1958 xmlStructuredErrorFunc schannel = NULL;
1959 void *data = NULL;
1961 if (ctxt != NULL) {
1969 error, XML_ERR_ERROR, NULL, 0,
1992 if (ctxt != NULL) {
1996 __xmlSimpleError(XML_FROM_SCHEMASV, XML_ERR_NO_MEMORY, node, NULL,
2029 xmlStructuredErrorFunc schannel = NULL;
2030 xmlGenericErrorFunc channel = NULL;
2031 void *data = NULL;
2033 if (ctxt != NULL) {
2036 const char *file = NULL;
2052 if ((node == NULL) &&
2054 (vctxt->inode != NULL)) {
2060 if ((node == NULL) &&
2061 (vctxt->parserCtxt != NULL) &&
2062 (vctxt->parserCtxt->input != NULL)) {
2071 node = NULL;
2075 if (vctxt->doc != NULL)
2077 else if ((vctxt->parserCtxt != NULL) &&
2078 (vctxt->parserCtxt->input != NULL))
2100 errorLevel, NULL, 0,
2127 msg, str1, str2, str3, NULL);
2145 xmlSchemaErr4(actxt, error, node, msg, str1, str2, NULL, NULL);
2153 xmlChar *str = NULL;
2155 *msg = NULL;
2156 if ((node != NULL) &&
2168 if (node != NULL) {
2176 if (elem->ns != NULL)
2181 NULL, elem->name));
2188 if (node->ns != NULL)
2193 NULL, node->name));
2221 * Return an empty string, in case NULL will break something.
2226 return (NULL);
2233 if ((type != NULL) && (xmlSchemaIsGlobalItem(type))) {
2236 NULL, type, NULL, 0));
2251 xmlChar *msg = NULL;
2253 if (actxt == NULL)
2262 xmlSchemaErr(actxt, XML_SCHEMAV_INTERNAL, NULL,
2266 xmlSchemaErr(actxt, XML_SCHEMAP_INTERNAL, NULL,
2277 xmlSchemaInternalErr2(actxt, funcName, message, NULL, NULL);
2302 xmlChar *msg = NULL;
2304 if ((node == NULL) && (item != NULL) &&
2307 xmlSchemaFormatItemForReport(&msg, NULL, item, NULL);
2328 message, str1, str2, NULL, NULL);
2343 xmlChar *msg = NULL;
2351 (const char *) msg, str1, str2, str3, NULL);
2367 xmlChar *msg = NULL, *qname = NULL;
2373 error, NULL, idcNode->nodeLine, (const char *) msg,
2377 str1, str2, NULL);
2386 if (node != NULL)
2389 (((xmlSchemaValidCtxtPtr) actxt)->inode != NULL))
2430 xmlChar *msg = NULL;
2454 xmlChar *str = NULL;
2469 xmlSchemaErr(actxt, error, node, (const char *) msg, value, NULL);
2471 xmlSchemaErr(actxt, error, node, (const char *) msg, NULL, NULL);
2480 if (node != NULL) {
2481 if (node->ns != NULL)
2484 return (xmlSchemaFormatQName(str, NULL, node->name));
2485 } else if (ni != NULL)
2487 return (NULL);
2496 xmlChar *msg = NULL, *str = NULL;
2502 NULL);
2517 xmlChar *str = NULL, *msg = NULL;
2535 nsName = NULL;
2539 if (cur == NULL)
2549 localName = NULL;
2603 xmlSchemaErr(actxt, error, node, (const char *) msg, NULL, NULL);
2619 xmlChar *str = NULL, *msg = NULL;
2636 if (message == NULL) {
2716 xmlSchemaErr(actxt, error, node, (const char *) msg, value, NULL);
2719 xmlSchemaErr(actxt, error, node, (const char *) msg, NULL, NULL);
2731 xmlSchemaCustomErr(ACTXT_CAST vctxt, err, NULL, type, msg, NULL, NULL);
2761 xmlChar *des = NULL;
2763 xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
2765 if (message != NULL)
2801 xmlChar *des = NULL, *strA = NULL;
2803 xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
2804 if (refTypeStr == NULL)
2807 NULL, NULL, NULL,
2811 BAD_CAST refTypeStr, NULL);
2834 xmlChar *des = NULL;
2836 if (ownerDes == NULL)
2837 xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent);
2838 else if (*ownerDes == NULL) {
2839 xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent);
2843 if (attr == NULL) {
2844 xmlSchemaPErrExt(ctxt, NULL, error, NULL, NULL, NULL,
2847 (const xmlChar *) msg, NULL, NULL);
2849 xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL,
2851 BAD_CAST des, attr->name, (const xmlChar *) msg, NULL, NULL);
2853 if (ownerDes == NULL)
2873 xmlChar *strA = NULL, *strB = NULL;
2879 NULL, NULL);
2908 xmlChar *des = NULL, *msg = NULL;
2910 xmlSchemaFormatItemForReport(&des, NULL, item, itemElem);
2914 if ((itemElem == NULL) && (item != NULL))
2916 xmlSchemaPErrExt(ctxt, itemElem, error, NULL, NULL, NULL,
2917 (const char *) msg, BAD_CAST des, str1, str2, str3, NULL);
2943 str1, NULL, NULL);
2969 xmlChar *str = NULL, *msg = NULL;
2971 xmlSchemaFormatItemForReport(&msg, NULL, ownerItem, NULL);
2974 BAD_CAST xmlSchemaFormatItemForReport(&str, NULL,
2975 WXS_BASIC_CAST attruse, NULL));
3002 xmlChar *des = NULL, *strT = NULL;
3004 xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, type->node);
3005 xmlSchemaPErrExt(ctxt, type->node, error, NULL, NULL, NULL,
3009 xmlSchemaFormatItemForReport(&strT, NULL, WXS_BASIC_CAST baseType, NULL),
3010 NULL, NULL);
3031 xmlChar *des = NULL;
3033 xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type,
3059 xmlChar *des = NULL;
3061 xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST ownerItem, attr->parent);
3062 xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL,
3064 BAD_CAST des, BAD_CAST name1, BAD_CAST name2, NULL, NULL);
3093 xmlChar *msg = NULL;
3096 if (message == NULL) {
3100 if (type != NULL) {
3119 xmlChar *str = NULL;
3145 xmlSchemaPErr(ctxt, node, error, (const char *) msg, value, NULL);
3147 xmlSchemaPErr(ctxt, node, error, (const char *) msg, NULL, NULL);
3151 xmlSchemaPErrExt(ctxt, node, error, NULL, NULL, NULL,
3152 (const char*) msg, str1, str2, NULL, NULL, NULL);
3180 xmlChar *des = NULL;
3182 xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
3183 if (message != NULL)
3188 if (content != NULL) {
3195 BAD_CAST des, NULL);
3229 * Returns the newly allocated structure or NULL in case or error
3237 if (ret == NULL) {
3238 xmlSchemaPErrMemory(ctxt, "allocating schema", NULL);
3239 return (NULL);
3253 * Returns the newly allocated structure or NULL in case or error
3261 if (ret == NULL) {
3262 return (NULL);
3276 * Returns the newly allocated structure or NULL in case or error
3284 if (ret == NULL) {
3286 return (NULL);
3299 if (ret == NULL) {
3300 xmlSchemaPErrMemory(NULL,
3301 "allocating an item list structure", NULL);
3302 return (NULL);
3311 if (list->items != NULL) {
3313 list->items = NULL;
3322 if (list->items == NULL) {
3325 if (list->items == NULL) {
3326 xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
3334 if (list->items == NULL) {
3335 xmlSchemaPErrMemory(NULL, "growing item list", NULL);
3349 if (list->items == NULL) {
3354 if (list->items == NULL) {
3355 xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
3363 if (list->items == NULL) {
3364 xmlSchemaPErrMemory(NULL, "growing item list", NULL);
3376 if (list->items == NULL) {
3379 if (list->items == NULL) {
3380 xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
3388 if (list->items == NULL) {
3389 xmlSchemaPErrMemory(NULL, "growing item list", NULL);
3416 if (list->items == NULL) {
3421 if (list->items == NULL) {
3422 xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
3430 if (list->items == NULL) {
3431 xmlSchemaPErrMemory(NULL, "growing item list", NULL);
3456 if ((list->items == NULL) || (idx >= list->nbItems)) {
3465 list->items = NULL;
3487 if (list == NULL)
3489 if (list->items != NULL)
3497 if (bucket == NULL)
3499 if (bucket->globals != NULL) {
3503 if (bucket->locals != NULL) {
3507 if (bucket->relations != NULL) {
3513 } while (cur != NULL);
3515 if ((! bucket->preserveDoc) && (bucket->doc != NULL)) {
3519 if (WXS_IMPBUCKET(bucket)->schema != NULL)
3533 if (WXS_CONSTRUCTOR(pctxt)->mainSchema == NULL) {
3536 return(NULL);
3545 if (ret == NULL) {
3546 xmlSchemaPErrMemory(NULL, "allocating schema bucket", NULL);
3547 return(NULL);
3553 if (ret->globals == NULL) {
3555 return(NULL);
3558 if (ret->locals == NULL) {
3560 return(NULL);
3574 return(NULL);
3590 return(NULL);
3597 if (WXS_IMPBUCKET(ret)->schema == NULL) {
3599 return(NULL);
3611 if (mainSchema->schemasImports == NULL) {
3614 if (mainSchema->schemasImports == NULL) {
3616 return(NULL);
3619 if (targetNamespace == NULL)
3629 return(NULL);
3641 if (mainSchema->includes == NULL) {
3643 if (mainSchema->includes == NULL) {
3645 return(NULL);
3655 return(NULL);
3662 if (*list == NULL) {
3664 if (*list == NULL)
3680 if (annot == NULL)
3682 if (annot->next == NULL) {
3691 } while (annot != NULL);
3704 if (nota == NULL)
3718 if (attr == NULL)
3720 if (attr->annot != NULL)
3722 if (attr->defVal != NULL)
3736 if (use == NULL)
3738 if (use->annot != NULL)
3740 if (use->defVal != NULL)
3754 if (prohib == NULL)
3770 while (set != NULL) {
3786 if (wildcard == NULL)
3788 if (wildcard->annot != NULL)
3790 if (wildcard->nsSet != NULL)
3792 if (wildcard->negNsSet != NULL)
3806 if (attrGr == NULL)
3808 if (attrGr->annot != NULL)
3810 if (attrGr->attrUses != NULL)
3838 while (link != NULL) {
3849 while (sto != NULL) {
3851 if (sto->history != NULL)
3853 if (sto->xpathCtxt != NULL)
3871 if (idcDef == NULL)
3873 if (idcDef->annot != NULL)
3876 if (idcDef->selector != NULL) {
3877 if (idcDef->selector->xpathComp != NULL)
3882 if (idcDef->fields != NULL) {
3887 if (prev->xpathComp != NULL)
3890 } while (cur != NULL);
3904 if (elem == NULL)
3906 if (elem->annot != NULL)
3908 if (elem->contModel != NULL)
3910 if (elem->defVal != NULL)
3924 if (facet == NULL)
3926 if (facet->val != NULL)
3928 if (facet->regexp != NULL)
3930 if (facet->annot != NULL)
3944 if (type == NULL)
3946 if (type->annot != NULL)
3948 if (type->facets != NULL) {
3952 while (facet != NULL) {
3958 if (type->attrUses != NULL)
3960 if (type->memberTypes != NULL)
3962 if (type->facetSet != NULL) {
3970 } while (link != NULL);
3972 if (type->contModel != NULL)
3986 if (item->annot != NULL)
4000 if (item->annot != NULL)
4008 if ((list == NULL) || (list->nbItems == 0))
4017 if (item == NULL)
4038 if (item->annot != NULL)
4072 xmlSchemaPSimpleInternalErr(NULL,
4093 if (schema == NULL)
4096 if (schema->volatiles != NULL)
4103 if (schema->notaDecl != NULL)
4104 xmlHashFree(schema->notaDecl, NULL);
4105 if (schema->attrDecl != NULL)
4106 xmlHashFree(schema->attrDecl, NULL);
4107 if (schema->attrgrpDecl != NULL)
4108 xmlHashFree(schema->attrgrpDecl, NULL);
4109 if (schema->elemDecl != NULL)
4110 xmlHashFree(schema->elemDecl, NULL);
4111 if (schema->typeDecl != NULL)
4112 xmlHashFree(schema->typeDecl, NULL);
4113 if (schema->groupDecl != NULL)
4114 xmlHashFree(schema->groupDecl, NULL);
4115 if (schema->idcDef != NULL)
4116 xmlHashFree(schema->idcDef, NULL);
4118 if (schema->schemasImports != NULL)
4121 if (schema->includes != NULL) {
4129 if (schema->annot != NULL)
4161 if (elem == NULL)
4169 if (namespace != NULL)
4204 if (elem->value != NULL)
4209 if (elem->namedType != NULL) {
4211 if (elem->namedTypeNs != NULL)
4215 } else if (elem->subtypes != NULL) {
4224 if (elem->substGroup != NULL) {
4226 if (elem->substGroupNs != NULL)
4245 if (annot == NULL)
4249 if (content != NULL) {
4267 xmlChar *str = NULL;
4272 if (particle == NULL)
4278 if (particle->children == NULL) {
4283 if (term == NULL) {
4284 fprintf(output, "(NULL)");
4321 (term->children != NULL)) {
4325 if (particle->next != NULL)
4344 xmlChar *str = NULL;
4347 if ((uses == NULL) || (uses->nbItems == 0))
4384 if (type == NULL) {
4385 fprintf(output, "Type: NULL\n");
4389 if (type->name != NULL)
4393 if (type->targetNamespace != NULL)
4455 if (type->base != NULL) {
4457 if (type->baseNs != NULL)
4462 if (type->attrUses != NULL)
4464 if (type->annot != NULL)
4468 (type->subtypes != NULL)) {
4485 if (output == NULL)
4487 if (schema == NULL) {
4488 fprintf(output, "Schemas: NULL\n");
4492 if (schema->name != NULL)
4496 if (schema->targetNamespace != NULL)
4501 if (schema->annot != NULL)
4522 xmlChar *str = NULL;
4532 if (bind == NULL)
4544 if ((key != NULL) && (key->val != NULL)) {
4552 } else if (key != NULL)
4566 if ((key != NULL) && (key->val != NULL)) {
4574 } else if (key != NULL)
4583 } while (bind != NULL);
4602 * Returns the attribute or NULL if not present.
4609 if ((node == NULL) || (name == NULL))
4610 return(NULL);
4612 while (prop != NULL) {
4613 if ((prop->ns == NULL) && xmlStrEqual(prop->name, BAD_CAST name))
4617 return (NULL);
4629 * Returns the attribute or NULL if not present.
4636 if ((node == NULL) || (name == NULL))
4637 return(NULL);
4639 while (prop != NULL) {
4640 if ((prop->ns != NULL) &&
4646 return (NULL);
4656 if (val == NULL)
4677 * Returns the string or NULL if not present.
4687 if (val == NULL)
4688 return(NULL);
4703 if (ret != NULL) goto exit; \
4707 if (nsName == NULL) \
4712 if (import == NULL) \
4725 * Returns the element declaration or NULL if not found.
4731 xmlSchemaElementPtr ret = NULL;
4733 if ((name == NULL) || (schema == NULL))
4734 return(NULL);
4735 if (schema != NULL) {
4740 if (ret == NULL) {
4741 if (nsName == NULL)
4759 * Returns the group definition or NULL if not found.
4765 xmlSchemaTypePtr ret = NULL;
4767 if (name == NULL)
4768 return (NULL);
4770 if ((nsName != NULL) && xmlStrEqual(nsName, xmlSchemaNs)) {
4772 if (ret != NULL)
4781 if (schema != NULL) {
4787 if (ret == NULL) {
4788 if (nsName == NULL)
4806 * Returns the attribute declaration or NULL if not found.
4812 xmlSchemaAttributePtr ret = NULL;
4814 if ((name == NULL) || (schema == NULL))
4815 return (NULL);
4816 if (schema != NULL) {
4821 if (ret == NULL) {
4822 if (nsName == NULL)
4840 * Returns the attribute group definition or NULL if not found.
4846 xmlSchemaAttributeGroupPtr ret = NULL;
4848 if ((name == NULL) || (schema == NULL))
4849 return (NULL);
4850 if (schema != NULL) {
4855 if ((ret != NULL) && (ret->redef != NULL)) {
4861 if (ret == NULL) {
4862 if (nsName == NULL)
4880 * Returns the group definition or NULL if not found.
4886 xmlSchemaModelGroupDefPtr ret = NULL;
4888 if ((name == NULL) || (schema == NULL))
4889 return (NULL);
4890 if (schema != NULL) {
4896 if (ret == NULL) {
4897 if (nsName == NULL)
4912 xmlSchemaNotationPtr ret = NULL;
4914 if ((name == NULL) || (schema == NULL))
4915 return (NULL);
4916 if (schema != NULL) {
4928 xmlSchemaIDCPtr ret = NULL;
4930 if ((name == NULL) || (schema == NULL))
4931 return (NULL);
4932 if (schema != NULL) {
4947 * Returns the group definition or NULL if not found.
4964 return (NULL);
4984 * Returns 1 if the string is NULL or made of blanks chars, 0 otherwise
4989 if (str == NULL)
5022 if ((bucket == NULL) || (name == NULL))
5023 return(NULL);
5024 if ((bucket->globals == NULL) ||
5063 return(NULL);
5071 if (bucket->relations != NULL) {
5080 if ((rel->bucket != NULL) &&
5084 if (ret != NULL)
5088 } while (rel != NULL);
5091 return(NULL);
5103 * Returns the new struture or NULL in case of error
5110 xmlSchemaNotationPtr ret = NULL;
5112 if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
5113 return (NULL);
5116 if (ret == NULL) {
5117 xmlSchemaPErrMemory(ctxt, "add annotation", NULL);
5118 return (NULL);
5140 * Returns the new struture or NULL in case of error
5147 xmlSchemaAttributePtr ret = NULL;
5149 if ((ctxt == NULL) || (schema == NULL))
5150 return (NULL);
5153 if (ret == NULL) {
5154 xmlSchemaPErrMemory(ctxt, "allocating attribute", NULL);
5155 return (NULL);
5181 * Returns the new struture or NULL in case of error
5187 xmlSchemaAttributeUsePtr ret = NULL;
5189 if (pctxt == NULL)
5190 return (NULL);
5193 if (ret == NULL) {
5194 xmlSchemaPErrMemory(pctxt, "allocating attribute", NULL);
5195 return (NULL);
5222 if (ret == NULL) {
5224 "allocating redefinition info", NULL);
5225 return (NULL);
5232 if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL)
5251 * Returns the new struture or NULL in case of error
5260 xmlSchemaAttributeGroupPtr ret = NULL;
5262 if ((pctxt == NULL) || (name == NULL))
5263 return (NULL);
5267 if (ret == NULL) {
5268 xmlSchemaPErrMemory(pctxt, "allocating attribute group", NULL);
5269 return (NULL);
5282 if (pctxt->redef == NULL) {
5284 return(NULL);
5303 * Returns the new struture or NULL in case of error
5310 xmlSchemaElementPtr ret = NULL;
5312 if ((ctxt == NULL) || (name == NULL))
5313 return (NULL);
5316 if (ret == NULL) {
5317 xmlSchemaPErrMemory(ctxt, "allocating element", NULL);
5318 return (NULL);
5344 * Returns the new struture or NULL in case of error
5352 xmlSchemaTypePtr ret = NULL;
5354 if ((ctxt == NULL) || (schema == NULL))
5355 return (NULL);
5358 if (ret == NULL) {
5359 xmlSchemaPErrMemory(ctxt, "allocating type", NULL);
5360 return (NULL);
5371 if (ctxt->redef == NULL) {
5373 return(NULL);
5394 if (ret == NULL) {
5396 "allocating QName reference item", NULL);
5397 return (NULL);
5399 ret->node = NULL;
5403 ret->item = NULL;
5419 if (ret == NULL) {
5421 "allocating attribute use prohibition", NULL);
5422 return (NULL);
5441 * Returns the new struture or NULL in case of error
5449 xmlSchemaModelGroupPtr ret = NULL;
5451 if ((ctxt == NULL) || (schema == NULL))
5452 return (NULL);
5456 if (ret == NULL) {
5458 NULL);
5459 return (NULL);
5483 * Returns the new struture or NULL in case of error
5489 xmlSchemaParticlePtr ret = NULL;
5490 if (ctxt == NULL)
5491 return (NULL);
5498 if (ret == NULL) {
5500 NULL);
5501 return (NULL);
5504 ret->annot = NULL;
5508 ret->next = NULL;
5509 ret->children = NULL;
5529 * Returns the new struture or NULL in case of error
5538 xmlSchemaModelGroupDefPtr ret = NULL;
5540 if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
5541 return (NULL);
5545 if (ret == NULL) {
5546 xmlSchemaPErrMemory(ctxt, "adding group", NULL);
5547 return (NULL);
5558 if (ctxt->redef == NULL) {
5560 return(NULL);
5575 * Returns the new struture or NULL in case of error
5584 if (ret == NULL) {
5585 xmlSchemaPErrMemory(ctxt, "creating wildcard namespace constraint", NULL);
5586 return (NULL);
5588 ret->value = NULL;
5589 ret->next = NULL;
5598 xmlSchemaIDCPtr ret = NULL;
5600 if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
5601 return (NULL);
5604 if (ret == NULL) {
5606 "allocating an identity-constraint definition", NULL);
5607 return (NULL);
5633 * Returns the new struture or NULL in case of error
5639 xmlSchemaWildcardPtr ret = NULL;
5641 if ((ctxt == NULL) || (schema == NULL))
5642 return (NULL);
5645 if (ret == NULL) {
5646 xmlSchemaPErrMemory(ctxt, "adding wildcard", NULL);
5647 return (NULL);
5659 if (group == NULL)
5661 if (group->members != NULL)
5673 if (WXS_SUBST_GROUPS(pctxt) == NULL) {
5675 if (WXS_SUBST_GROUPS(pctxt) == NULL)
5676 return(NULL);
5680 if (ret == NULL) {
5681 xmlSchemaPErrMemory(NULL,
5682 "allocating a substitution group container", NULL);
5683 return(NULL);
5689 if (ret->members == NULL) {
5691 return(NULL);
5699 return(NULL);
5708 if (WXS_SUBST_GROUPS(pctxt) == NULL)
5709 return(NULL);
5723 * Returns the newly allocated structure or NULL in case or error
5730 xmlSchemaSubstGroupPtr substGroup = NULL;
5732 if ((pctxt == NULL) || (head == NULL) || (member == NULL))
5736 if (substGroup == NULL)
5738 if (substGroup == NULL)
5781 *uri = NULL;
5782 *local = NULL;
5789 NULL, value, NULL, NULL, NULL);
5796 ns = xmlSearchNs(attr->doc, attr->parent, NULL);
5818 if (ns == NULL) {
5822 xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), NULL, value,
5824 "corresponding namespace declaration in scope", value, NULL);
5892 if (attr == NULL) {
5893 *local = NULL;
5894 *uri = NULL;
5921 if (attr == NULL)
5938 if (strip != NULL) {
5942 res = xmlAddID(NULL, attr->doc, value, attr);
5943 if (res == NULL) {
5947 NULL, (xmlNodePtr) attr,
5949 NULL, NULL, "Duplicate value '%s' of simple "
5950 "type 'xs:ID'", value, NULL);
5958 NULL, (xmlNodePtr) attr,
5960 NULL, NULL, "The value '%s' of simple type 'xs:ID' is "
5962 value, NULL);
5964 if (value != NULL)
5978 if (attr == NULL)
6002 if (attr == NULL)
6011 NULL, (xmlNodePtr) attr, NULL, expected,
6012 val, NULL, NULL, NULL);
6025 NULL, (xmlNodePtr) attr, NULL, expected,
6026 val, NULL, NULL, NULL);
6042 NULL, (xmlNodePtr) attr, NULL, expected,
6043 val, NULL, NULL, NULL);
6067 if (attr == NULL)
6077 NULL, (xmlNodePtr) attr, NULL, expected,
6078 val, NULL, NULL, NULL);
6094 NULL, (xmlNodePtr) attr, NULL, expected,
6095 val, NULL, NULL, NULL);
6117 xmlChar *value = NULL;
6139 NULL, BAD_CAST value,
6140 NULL, NULL, NULL);
6142 if (value != NULL)
6167 if (val == NULL)
6185 NULL,
6188 NULL, val, NULL, NULL, NULL);
6256 if ((pctxt == NULL) || (type == NULL) || (attr == NULL))
6269 ret = xmlSchemaValPredefTypeNode(type, value, NULL,
6293 type, NULL, value, NULL, NULL, NULL);
6324 if ((ctxt == NULL) || (type == NULL) || (attr == NULL))
6328 if (value != NULL)
6364 if ((ctxt == NULL) || (type == NULL)) {
6365 if (value != NULL)
6366 *value = NULL;
6370 if (value != NULL)
6371 *value = NULL;
6376 type->name, NULL);
6380 if (attr == NULL) {
6381 if (value != NULL)
6382 *value = NULL;
6404 if (WXS_BUCKET(pctxt)->relations != NULL) {
6413 } while (rel != NULL);
6419 xmlNodePtr n = (attr != NULL) ? (xmlNodePtr) attr : node;
6421 if (namespaceName == NULL)
6423 XML_SCHEMAP_SRC_RESOLVE, n, NULL,
6426 "import statement", NULL, NULL);
6429 XML_SCHEMAP_SRC_RESOLVE, n, NULL,
6432 "import statement", namespaceName, NULL);
6461 if ((item != NULL) && (hasRefs != NULL))
6464 if (item != NULL) {
6465 if (*list == NULL) {
6468 if (*list == NULL)
6495 xmlNodePtr child = NULL;
6507 if ((ctxt == NULL) || (node == NULL))
6508 return (NULL);
6512 ret = NULL;
6514 while (attr != NULL) {
6515 if (((attr->ns == NULL) &&
6517 ((attr->ns != NULL) &&
6521 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
6530 while (child != NULL) {
6539 while (attr != NULL) {
6540 if (((attr->ns == NULL) &&
6542 ((attr->ns != NULL) &&
6546 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
6550 xmlSchemaPValAttr(ctxt, NULL, child, "source",
6551 xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL);
6561 while (attr != NULL) {
6562 if (attr->ns == NULL) {
6565 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
6573 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
6582 if (attr != NULL)
6583 xmlSchemaPValAttrNode(ctxt, NULL, attr,
6584 xmlSchemaGetBuiltInType(XML_SCHEMAS_LANGUAGE), NULL);
6590 NULL, node, child, NULL, "(appinfo | documentation)*");
6608 * Returns the new type structure or NULL in case of error
6615 xmlNodePtr child = NULL;
6618 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
6619 return (NULL);
6622 if (facet == NULL) {
6624 return (NULL);
6628 if (value == NULL) {
6630 "Facet %s has no value\n", node->name, NULL);
6632 return (NULL);
6660 "Unknown facet type %s\n", node->name, NULL);
6662 return (NULL);
6671 if (fixed != NULL) {
6682 if (child != NULL) {
6685 node->name, NULL);
6712 xmlSchemaWildcardNsPtr tmp, lastNs = NULL;
6716 if ((pc == NULL)
6726 NULL, node,
6727 NULL, "(strict | skip | lax)", pc,
6728 NULL, NULL, NULL);
6737 if ((attr == NULL) || (xmlStrEqual(ns, BAD_CAST "##any")))
6741 if (wildc->negNsSet == NULL) {
6762 NULL, (xmlNodePtr) attr,
6763 NULL,
6766 nsItem, NULL, NULL, NULL);
6772 dictnsItem = NULL;
6777 xmlSchemaPValAttrNodeValue(ctxt, NULL, attr,
6785 while (tmp != NULL) {
6790 if (tmp == NULL) {
6792 if (tmp == NULL) {
6797 tmp->next = NULL;
6798 if (wildc->nsSet == NULL)
6800 else if (lastNs != NULL)
6838 NULL, NULL,
6848 NULL, NULL,
6868 * Returns the particle or NULL in case of error or if minOccurs==maxOccurs==0
6875 xmlNodePtr child = NULL;
6879 xmlSchemaAnnotPtr annot = NULL;
6881 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
6882 return (NULL);
6887 while (attr != NULL) {
6888 if (attr->ns == NULL) {
6895 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
6899 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
6911 xmlSchemaPCheckParticleCorrect_2(ctxt, NULL, node, min, max);
6916 if (wild == NULL)
6917 return (NULL);
6927 if (child != NULL) {
6930 NULL, node, child,
6931 NULL, "(annotation?)");
6938 return (NULL);
6944 if (particle == NULL)
6945 return (NULL);
6960 * Returns the new structure or NULL in case of error
6968 xmlNodePtr child = NULL;
6970 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
6971 return (NULL);
6973 if (name == NULL) {
6975 "Notation has no name\n", NULL, NULL);
6976 return (NULL);
6980 if (ret == NULL)
6981 return (NULL);
6989 if (child != NULL) {
6992 NULL, node, child,
6993 NULL, "(annotation?)");
7008 * Returns a wildcard or NULL.
7015 xmlNodePtr child = NULL;
7018 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
7019 return (NULL);
7023 if (ret == NULL) {
7024 return (NULL);
7030 while (attr != NULL) {
7031 if (attr->ns == NULL) {
7036 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7040 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7049 return (NULL);
7058 if (child != NULL) {
7061 NULL, node, child,
7062 NULL, "(annotation?)");
7087 const xmlChar *attrValue, *name = NULL, *ns = NULL;
7088 xmlSchemaAttributeUsePtr use = NULL;
7089 xmlNodePtr child = NULL;
7091 const xmlChar *tmpNs = NULL, *tmpName = NULL, *defValue = NULL;
7102 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7103 return (NULL);
7105 if (attr != NULL) {
7107 NULL, attr, &tmpNs, &tmpName) != 0) {
7108 return (NULL);
7111 return(NULL);
7119 while (attr != NULL) {
7120 if (attr->ns == NULL) {
7135 xmlSchemaPValAttrNodeQName(pctxt, schema, NULL,
7151 NULL, (xmlNodePtr) attr,
7152 NULL, "(qualified | unqualified)",
7153 attrValue, NULL, NULL, NULL);
7171 NULL, (xmlNodePtr) attr,
7172 NULL, "(optional | prohibited | required)",
7173 attrValue, NULL, NULL, NULL);
7184 NULL, attr, "default", "fixed");
7198 NULL, attr, "default", "fixed");
7209 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7223 NULL, node, NULL,
7224 "(optional | prohibited | required)", NULL,
7227 NULL, NULL);
7233 return(NULL);
7247 node, NULL,
7249 xmlSchemaInstanceNs, NULL);
7252 if (attr == NULL) {
7254 NULL, node, "name", NULL);
7255 return (NULL);
7257 if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
7259 return (NULL);
7268 NULL, (xmlNodePtr) attr,
7269 xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
7271 NULL, NULL);
7272 return (NULL);
7280 if (use == NULL)
7281 return(NULL);
7287 if (attrDecl == NULL)
7288 return (NULL);
7289 if (tmpName != NULL) {
7297 if (defValue != NULL) {
7309 if (use == NULL)
7310 return(NULL);
7321 if (ref == NULL)
7322 return(NULL);
7331 if (defValue != NULL)
7349 if (child != NULL) {
7352 NULL, node, child, NULL,
7361 node, NULL,
7364 NULL, NULL, NULL);
7365 return(NULL);
7369 node, NULL,
7372 NULL, NULL, NULL);
7373 return(NULL);
7391 xmlChar *str = NULL;
7395 node, NULL,
7398 NULL, NULL);
7400 return(NULL);
7408 if (prohib == NULL)
7409 return(NULL);
7429 if (child != NULL) {
7438 NULL, node, child, NULL,
7443 NULL, node, child, NULL,
7448 if (WXS_ATTRUSE_DECL(use)->typeName != NULL) {
7454 NULL, node, child,
7456 "are mutually exclusive", NULL);
7462 if (child != NULL)
7464 NULL, node, child, NULL,
7479 xmlNodePtr child = NULL;
7488 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7489 return (NULL);
7495 if (attr == NULL) {
7497 NULL, node, "name", NULL);
7498 return (NULL);
7500 if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
7502 return (NULL);
7511 NULL, (xmlNodePtr) attr,
7512 xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
7514 NULL, NULL);
7515 return (NULL);
7525 XML_SCHEMAP_NO_XSI, node, NULL,
7527 xmlSchemaInstanceNs, NULL);
7532 if (ret == NULL)
7533 return (NULL);
7540 while (attr != NULL) {
7541 if (attr->ns == NULL) {
7549 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7553 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7557 xmlSchemaPValAttrQName(pctxt, schema, NULL,
7565 if (ret->defValue != NULL)
7571 if (attr != NULL) {
7591 if (ret->typeName != NULL) {
7597 NULL, node, child,
7599 "are mutually exclusive", NULL);
7604 if (child != NULL)
7606 NULL, node, child, NULL,
7623 * Returns the attribute group or NULL in case of error.
7631 xmlNodePtr child = NULL;
7633 const xmlChar *refNs = NULL, *ref = NULL;
7635 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7636 return (NULL);
7639 if (attr == NULL) {
7642 NULL, node, "ref", NULL);
7643 return (NULL);
7646 NULL, attr, &refNs, &ref);
7648 return(NULL);
7654 while (attr != NULL) {
7655 if (attr->ns == NULL) {
7660 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7664 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7682 if (child != NULL) {
7685 NULL, node, child, NULL,
7706 xmlChar *str = NULL;
7709 XML_SCHEMAP_SRC_REDEFINE, node, NULL,
7713 xmlSchemaFormatQName(&str, refNs, ref), NULL);
7715 return(NULL);
7724 if (ret == NULL)
7725 return(NULL);
7736 if (ret == NULL)
7737 return(NULL);
7754 * Returns the attribute group definition or NULL in case of error.
7763 xmlNodePtr child = NULL;
7767 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7768 return (NULL);
7771 if (attr == NULL) {
7774 NULL, node, "name", NULL);
7775 return (NULL);
7781 NULL, attr,
7783 return (NULL);
7787 if (ret == NULL)
7788 return (NULL);
7793 while (attr != NULL) {
7794 if (attr->ns == NULL) {
7799 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7803 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
7823 return(NULL);
7834 if (child != NULL) {
7837 NULL, node, child, NULL,
7897 if ((flags == NULL) || (value == NULL))
7961 if (item != NULL)
7986 if (selector == NULL) {
7990 "the selector is not specified.\n", NULL, NULL);
7993 if (attr == NULL)
7997 if (selector->xpath == NULL) {
8001 NULL, node,
8002 "The XPath expression of the selector is not valid", NULL);
8005 const xmlChar **nsArray = NULL;
8006 xmlNsPtr *nsList = NULL;
8015 if (attr == NULL)
8016 nsList = NULL;
8022 if (nsList != NULL) {
8025 for (i = 0; nsList[i] != NULL; i++)
8030 if (nsArray == NULL) {
8032 NULL);
8040 nsArray[count * 2] = NULL;
8048 NULL, XML_PATTERN_XSFIELD, nsArray);
8051 NULL, XML_PATTERN_XSSEL, nsArray);
8052 if (nsArray != NULL)
8055 if (selector->xpathComp == NULL) {
8059 NULL, node,
8070 if (item->annot == NULL) { \
8075 if (cur->next != NULL) { \
8093 if ((annItem == NULL) || (annot == NULL))
8094 return (NULL);
8166 xmlSchemaPCustomErr(NULL,
8168 NULL, NULL,
8170 "The item is not a annotated schema component", NULL);
8194 xmlNodePtr child = NULL;
8201 while (attr != NULL) {
8202 if (attr->ns == NULL) {
8206 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8210 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8218 if (item == NULL) {
8221 NULL);
8222 return (NULL);
8229 if (attr == NULL) {
8232 NULL, node,
8233 "name", NULL);
8247 NULL, NULL);
8264 if (child != NULL) {
8267 NULL, node, child,
8268 NULL, "(annotation?)");
8291 xmlSchemaIDCPtr item = NULL;
8292 xmlNodePtr child = NULL;
8294 const xmlChar *name = NULL;
8295 xmlSchemaIDCSelectPtr field = NULL, lastField = NULL;
8301 while (attr != NULL) {
8302 if (attr->ns == NULL) {
8308 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8312 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8320 if (attr == NULL) {
8323 NULL, node,
8324 "name", NULL);
8325 return (NULL);
8327 NULL, attr,
8329 return (NULL);
8334 if (item == NULL)
8335 return(NULL);
8343 if (attr == NULL) {
8346 NULL, node,
8347 "refer", NULL);
8353 NULL, NULL);
8354 if (item->ref == NULL)
8355 return (NULL);
8357 NULL, attr,
8372 if (child == NULL) {
8375 NULL, node, child,
8393 if (field != NULL) {
8396 if (lastField != NULL)
8407 NULL, node, child,
8408 NULL, "(annotation?, (selector, field+))");
8411 if (child != NULL) {
8414 NULL, node, child,
8415 NULL, "(annotation?, (selector, field+))");
8431 * Returns the element declaration or a particle; NULL in case
8438 xmlSchemaElementPtr decl = NULL;
8439 xmlSchemaParticlePtr particle = NULL;
8440 xmlSchemaAnnotPtr annot = NULL;
8441 xmlNodePtr child = NULL;
8444 xmlChar *des = NULL;
8449 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
8450 return (NULL);
8452 if (isElemRef != NULL)
8461 if ((topLevel) || (attr == NULL)) {
8462 if (nameAttr == NULL) {
8465 NULL, node, "name", NULL);
8466 return (NULL);
8487 xmlSchemaPCheckParticleCorrect_2(ctxt, NULL, node, min, max);
8489 if (particle == NULL)
8495 const xmlChar *refNs = NULL, *ref = NULL;
8496 xmlSchemaQNameRefPtr refer = NULL;
8500 if (isElemRef != NULL)
8504 NULL, attr, &refNs, &ref);
8509 if (nameAttr != NULL) {
8511 XML_SCHEMAP_SRC_ELEMENT_2_1, NULL, nameAttr, "ref", "name");
8517 while (attr != NULL) {
8518 if (attr->ns == NULL) {
8531 NULL, NULL, attr,
8538 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8545 if (child != NULL) {
8547 NULL, node, child, NULL, "(annotation?)");
8556 if (refer == NULL)
8572 const xmlChar *ns = NULL, *fixed, *name, *attrValue;
8573 xmlSchemaIDCPtr curIDC = NULL, lastIDC = NULL;
8575 if (xmlSchemaPValAttrNode(ctxt, NULL, nameAttr,
8585 if (attr != NULL) {
8592 NULL, (xmlNodePtr) attr,
8593 NULL, "(qualified | unqualified)",
8594 attrValue, NULL, NULL, NULL);
8600 if (decl == NULL) {
8607 while (attr != NULL) {
8608 if (attr->ns == NULL) {
8623 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8630 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8636 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8650 NULL, node, "substitutionGroup",
8658 if (attr == NULL) {
8671 NULL, (xmlNodePtr) attr,
8672 NULL, "(#all | List of (extension | restriction))",
8673 attrValue, NULL, NULL, NULL);
8681 if (attr == NULL) {
8700 NULL, (xmlNodePtr) attr,
8701 NULL, "(#all | List of (extension | "
8703 NULL, NULL, NULL);
8710 if (attr != NULL) {
8712 NULL, attr,
8719 if (attr != NULL) {
8721 if (decl->value != NULL) {
8728 NULL, attr, "default", "fixed");
8743 if (decl->namedType != NULL) {
8746 NULL, node, child,
8748 "mutually exclusive", NULL);
8758 if (decl->namedType != NULL) {
8761 NULL, node, child,
8763 "mutually exclusive", NULL);
8780 if (lastIDC != NULL)
8787 if (child != NULL) {
8790 NULL, node, child,
8791 NULL, "(annotation?, ((simpleType | complexType)?, "
8810 if (annot != NULL) {
8811 if (particle != NULL)
8812 particle->annot = NULL;
8813 if (decl != NULL)
8814 decl->annot = NULL;
8817 return (NULL);
8837 xmlNodePtr child = NULL;
8839 const xmlChar *cur = NULL;
8841 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
8858 while (attr != NULL) {
8859 if (attr->ns == NULL) {
8863 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8867 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
8877 if (attr != NULL) {
8881 xmlSchemaTypeLinkPtr link, lastLink = NULL;
8896 NULL, attr, BAD_CAST tmp, &nsName, &localName) == 0) {
8902 if (link == NULL) {
8904 "allocating a type link", NULL);
8907 link->type = NULL;
8908 link->next = NULL;
8909 if (lastLink == NULL)
8919 if (ref == NULL) {
8947 xmlSchemaTypePtr subtype, last = NULL;
8956 if (subtype != NULL) {
8957 if (last == NULL) {
8964 last->next = NULL;
8969 if (child != NULL) {
8972 NULL, node, child, NULL, "(annotation?, simpleType*)");
8974 if ((attr == NULL) && (type->subtypes == NULL)) {
8982 NULL, node,
8984 "at least one <simpleType> child must be present", NULL);
9006 xmlNodePtr child = NULL;
9009 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
9010 return (NULL);
9026 while (attr != NULL) {
9027 if (attr->ns == NULL) {
9031 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9035 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9049 xmlSchemaPValAttrQName(ctxt, schema, NULL,
9066 if (type->base != NULL) {
9069 NULL, node,
9071 "are mutually exclusive", NULL);
9076 } else if (type->base == NULL) {
9079 NULL, node,
9081 "must be present", NULL);
9083 if (child != NULL) {
9086 NULL, node, child, NULL, "(annotation?, simpleType?)");
9088 if ((type->base == NULL) &&
9089 (type->subtypes == NULL) &&
9090 (xmlSchemaGetPropNode(node, "itemType") == NULL)) {
9093 NULL, node,
9095 "must be present", NULL);
9097 return (NULL);
9117 xmlNodePtr child = NULL;
9118 const xmlChar *attrValue = NULL;
9122 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
9123 return (NULL);
9127 if (attr == NULL) {
9130 NULL, node,
9131 "name", NULL);
9132 return (NULL);
9135 NULL, attr,
9137 return (NULL);
9151 NULL, node,
9153 "supported", NULL);
9154 return(NULL);
9157 if (biType != NULL)
9184 NULL, ctxt->targetNamespace, node, 0);
9186 if (type == NULL)
9187 return (NULL);
9194 while (attr != NULL) {
9195 if (attr->ns == NULL) {
9198 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9202 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9214 if (type == NULL)
9215 return (NULL);
9223 while (attr != NULL) {
9224 if (attr->ns == NULL) {
9229 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9233 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9241 if (attr == NULL) {
9258 NULL, "(#all | List of (list | union | restriction)",
9259 attrValue, NULL, NULL, NULL);
9277 if (child == NULL) {
9279 NULL, node, child, NULL,
9293 if (child != NULL) {
9295 NULL, node, child, NULL,
9307 NULL, node, "This is a redefinition, thus the "
9308 "<simpleType> must have a <restriction> child", NULL);
9324 * NULL in case of an error.
9332 xmlNodePtr child = NULL;
9334 const xmlChar *ref = NULL, *refNs = NULL;
9337 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
9338 return (NULL);
9341 if (attr == NULL) {
9344 NULL, node, "ref", NULL);
9345 return (NULL);
9346 } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL,
9348 return (NULL);
9358 while (attr != NULL) {
9359 if (attr->ns == NULL) {
9365 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9369 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9375 if (item == NULL)
9376 return (NULL);
9396 if (child != NULL) {
9399 NULL, node, child, NULL,
9406 return (NULL);
9434 xmlNodePtr child = NULL;
9438 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
9439 return (NULL);
9442 if (attr == NULL) {
9445 NULL, node,
9446 "name", NULL);
9447 return (NULL);
9448 } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr,
9450 return (NULL);
9454 if (item == NULL)
9455 return (NULL);
9460 while (attr != NULL) {
9461 if (attr->ns == NULL) {
9465 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9469 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
9498 if (child != NULL) {
9501 NULL, node, child, NULL,
9519 if ((ctxt == NULL) || (root == NULL)) return;
9524 delete = NULL;
9526 while (cur != NULL) {
9527 if (delete != NULL) {
9530 delete = NULL;
9547 if (cur->children != NULL) {
9556 if (cur->next != NULL) {
9563 if (cur == NULL)
9566 cur = NULL;
9569 if (cur->next != NULL) {
9573 } while (cur != NULL);
9575 if (delete != NULL) {
9578 delete = NULL;
9632 if (attr != NULL) {
9633 res = xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr,
9639 if (attr != NULL) {
9640 res = xmlSchemaPValAttrNode(ctxt, NULL, attr,
9641 xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL);
9649 if (attr != NULL) {
9657 NULL, (xmlNodePtr) attr, NULL,
9658 "(qualified | unqualified)", val, NULL, NULL, NULL);
9662 if (attr != NULL) {
9670 NULL, (xmlNodePtr) attr, NULL,
9671 "(qualified | unqualified)", val, NULL, NULL, NULL);
9675 if (attr != NULL) {
9687 NULL, (xmlNodePtr) attr, NULL,
9689 val, NULL, NULL, NULL);
9693 if (attr != NULL) {
9703 NULL, (xmlNodePtr) attr, NULL,
9705 val, NULL, NULL, NULL);
9724 * NULL in case of error
9734 if ((ctxt == NULL) || (schema == NULL) || (nodes == NULL))
9745 if (schema->annot == NULL)
9777 while (child != NULL) {
9785 xmlSchemaParseElement(ctxt, schema, child, NULL, 1);
9802 NULL, child->parent, child,
9803 NULL, "((include | import | redefine | annotation)*, "
9813 if (schema->annot == NULL)
9821 ctxt->ctxtType = NULL;
9836 if (ret == NULL) {
9837 xmlSchemaPErrMemory(NULL, "allocating schema relation", NULL);
9838 return(NULL);
9857 while (redef != NULL) {
9873 if (con->buckets != NULL)
9875 if (con->pending != NULL)
9877 if (con->substGroups != NULL)
9880 if (con->redefs != NULL)
9882 if (con->dict != NULL)
9894 if (ret == NULL) {
9895 xmlSchemaPErrMemory(NULL,
9896 "allocating schema construction context", NULL);
9897 return (NULL);
9902 if (ret->buckets == NULL) {
9903 xmlSchemaPErrMemory(NULL,
9904 "allocating list of schema buckets", NULL);
9906 return (NULL);
9909 if (ret->pending == NULL) {
9910 xmlSchemaPErrMemory(NULL,
9911 "allocating list of pending global components", NULL);
9913 return (NULL);
9926 if (ret == NULL) {
9927 xmlSchemaPErrMemory(NULL, "allocating schema parser context",
9928 NULL);
9929 return (NULL);
9934 if (ret->attrProhibs == NULL) {
9936 return(NULL);
9949 * Returns the parser context or NULL in case of error
9957 if (ret == NULL)
9958 return (NULL);
9961 if (URL != NULL)
9969 if (vctxt->pctxt == NULL) {
9970 if (vctxt->schema != NULL)
9975 if (vctxt->pctxt == NULL) {
9997 * @schemaLocation, NULL otherwise.
10008 return(NULL);
10018 return(NULL);
10031 return(NULL);
10037 if ((cur->origTargetNamespace == NULL) &&
10043 return(NULL);
10048 (((b)->doc == NULL) && ((b)->schemaLocation != NULL))
10060 return(NULL);
10072 return(NULL);
10105 if ((bucket->targetNamespace != NULL) &&
10120 if (node->children == NULL)
10152 if (bucket == NULL)
10159 if (bucket->doc == NULL) {
10164 if (pctxt->constructor == NULL) {
10172 if (newpctxt == NULL)
10195 newpctxt->constructor = NULL;
10207 if (cur == NULL) {
10211 while (cur->next != NULL)
10224 if (location != NULL) {
10225 if (ctxtNode == NULL)
10229 const xmlChar *ret = NULL;
10232 if (base == NULL) {
10238 if (URI != NULL) {
10245 return(NULL);
10274 const xmlChar *targetNamespace = NULL;
10275 xmlSchemaSchemaRelationPtr relation = NULL;
10276 xmlDocPtr doc = NULL;
10278 xmlSchemaBucketPtr bkt = NULL;
10280 if (bucket != NULL)
10281 *bucket = NULL;
10305 if (schemaLocation != NULL) {
10307 if ((bkt != NULL) &&
10312 invokingNode, NULL,
10314 NULL, NULL);
10322 if (relation == NULL)
10333 if (schemaLocation == NULL) {
10345 if (bkt != NULL) {
10351 if (schemaLocation == NULL)
10356 invokingNode, NULL,
10359 schemaLocation, NULL);
10368 if (schemaLocation == NULL)
10373 invokingNode, NULL,
10376 schemaLocation, NULL);
10403 if (bkt != NULL) {
10410 if (bkt != NULL) {
10412 if (bkt->schemaLocation == NULL) {
10423 if (schemaLocation == NULL)
10428 invokingNode, NULL,
10443 if (bkt != NULL) {
10445 if ((bkt->origTargetNamespace == NULL) &&
10468 if (chamel != NULL) {
10480 bkt = NULL;
10487 if ((bkt != NULL) && (bkt->doc != NULL)) {
10498 if (schemaDoc != NULL) {
10503 if (schemaDoc->URL != NULL)
10508 } else if ((schemaLocation != NULL) || (schemaBuffer != NULL)) {
10512 if (parserCtxt == NULL) {
10513 xmlSchemaPErrMemory(NULL, "xmlSchemaGetDoc, "
10514 "allocating a parser context", NULL);
10517 if ((pctxt->dict != NULL) && (parserCtxt->dict != NULL)) {
10526 if (schemaLocation != NULL) {
10529 NULL, SCHEMAS_PARSE_OPTIONS);
10530 } else if (schemaBuffer != NULL) {
10533 NULL, NULL, SCHEMAS_PARSE_OPTIONS);
10535 if (doc != NULL)
10551 if (doc == NULL) {
10560 if ((lerr == NULL) || (lerr->domain != XML_FROM_IO)) {
10568 invokingNode, NULL,
10570 schemaLocation, NULL);
10574 if ((doc == NULL) && located)
10577 xmlSchemaPErr(pctxt, NULL,
10581 NULL, NULL);
10587 if (doc != NULL) {
10588 xmlNodePtr docElem = NULL;
10592 if (docElem == NULL) {
10594 invokingNode, NULL,
10596 schemaLocation, NULL);
10608 invokingNode, NULL,
10610 schemaLocation, NULL);
10622 if ((bkt == NULL) && located) {
10626 if (bkt == NULL)
10629 if (bkt != NULL) {
10632 if (doc != NULL) {
10644 if (relation != NULL)
10653 if (bucket != NULL)
10658 if ((doc != NULL) && (! preserveDoc)) {
10660 if (bkt != NULL)
10661 bkt->doc = NULL;
10666 if ((doc != NULL) && (! preserveDoc)) {
10668 if (bkt != NULL)
10669 bkt->doc = NULL;
10691 const xmlChar *namespaceName = NULL, *schemaLocation = NULL;
10695 xmlSchemaBucketPtr bucket = NULL;
10697 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
10704 while (attr != NULL) {
10705 if (attr->ns == NULL) {
10710 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
10714 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
10721 if (xmlSchemaPValAttr(pctxt, NULL, node,
10726 NULL, node,
10728 NULL, namespaceName, NULL, NULL, NULL);
10732 if (xmlSchemaPValAttr(pctxt, NULL, node,
10737 NULL, node,
10739 NULL, namespaceName, NULL, NULL, NULL);
10753 if (child != NULL) {
10756 NULL, node, child, NULL,
10768 if (namespaceName != NULL) {
10777 NULL, node,
10788 if (thisTargetNamespace == NULL) {
10791 NULL, node,
10794 NULL);
10801 if (schemaLocation != NULL)
10805 schemaLocation, NULL, NULL, 0, node, thisTargetNamespace,
10818 if ((bucket == NULL) && (schemaLocation != NULL)) {
10821 node, NULL,
10823 "Skipping the import", schemaLocation, NULL, NULL);
10826 if ((bucket != NULL) && CAN_PARSE_SCHEMA(bucket)) {
10842 if ((pctxt == NULL) || (schema == NULL) || (node == NULL) ||
10843 (schemaLocation == NULL))
10846 *schemaLocation = NULL;
10852 while (attr != NULL) {
10853 if (attr->ns == NULL) {
10857 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
10861 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
10874 if (attr != NULL) {
10875 xmlChar *base = NULL;
10876 xmlChar *uri = NULL;
10878 if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
10883 if (base == NULL) {
10889 if (uri == NULL) {
10899 NULL, node, "schemaLocation", NULL);
10909 NULL, node,
10915 NULL, node,
10935 xmlNodePtr child = NULL;
10936 const xmlChar *schemaLocation = NULL;
10939 xmlSchemaBucketPtr bucket = NULL;
10941 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
10955 res = xmlSchemaAddSchemaDoc(pctxt, type, schemaLocation, NULL,
10956 NULL, 0, node, pctxt->targetNamespace, NULL, &bucket);
10964 if ((bucket == NULL) || (bucket->doc == NULL)) {
10979 node, NULL,
10981 schemaLocation, NULL);
10996 node, NULL,
10998 schemaLocation, NULL);
11006 if (bucket->origTargetNamespace != NULL) {
11013 if (pctxt->targetNamespace == NULL) {
11016 node, NULL,
11020 schemaLocation, NULL);
11027 NULL, node,
11035 } else if (pctxt->targetNamespace != NULL) {
11042 bucket->origTargetNamespace != NULL) {
11045 node, NULL,
11049 schemaLocation, NULL);
11058 if (bucket && (!bucket->parsed) && (bucket->doc != NULL)) {
11109 pctxt->redefined = NULL;
11119 if (child != NULL) {
11123 NULL, node, child, NULL,
11127 NULL, node, child, NULL,
11197 xmlSchemaParticlePtr particle = NULL;
11198 xmlNodePtr child = NULL;
11202 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
11203 return (NULL);
11208 if (item == NULL)
11209 return (NULL);
11221 xmlSchemaPCheckParticleCorrect_2(ctxt, NULL, node, min, max);
11226 if (particle == NULL)
11227 return (NULL);
11233 while (attr != NULL) {
11234 if (attr->ns == NULL) {
11239 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11243 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11252 while (attr != NULL) {
11253 if (attr->ns == NULL) {
11256 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11260 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11279 xmlSchemaParticlePtr part, last = NULL;
11289 if (part != NULL) {
11295 NULL, child,
11297 NULL);
11304 NULL, child,
11306 NULL);
11310 if (last == NULL)
11318 if (child != NULL) {
11321 NULL, node, child, NULL,
11326 xmlSchemaTreeItemPtr part = NULL, last = NULL;
11342 if (part != NULL)
11366 xmlChar *str = NULL;
11369 XML_SCHEMAP_SRC_REDEFINE, child, NULL,
11376 NULL);
11378 part = NULL;
11382 xmlChar *str = NULL;
11390 XML_SCHEMAP_SRC_REDEFINE, child, NULL,
11398 NULL);
11400 part = NULL;
11416 if (part != NULL) {
11417 if (last == NULL)
11425 if (child != NULL) {
11428 NULL, node, child, NULL,
11433 return (NULL);
11455 * Returns the type definition or NULL in case of error
11462 xmlNodePtr child = NULL;
11465 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
11466 return (NULL);
11475 while (attr != NULL) {
11476 if (attr->ns == NULL) {
11480 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11484 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11504 if (xmlSchemaPValAttrQName(ctxt, schema, NULL, node, "base",
11507 if ((type->base == NULL) && (type->type == XML_SCHEMA_TYPE_COMPLEX)) {
11510 NULL, node, "base", NULL);
11514 if (type->base == NULL) {
11517 NULL, node, "base", NULL);
11521 xmlChar *str1 = NULL, *str2 = NULL;
11530 NULL, node, "This is a redefinition, but the QName "
11535 type->name), NULL);
11539 type->base = NULL;
11540 type->baseNs = NULL;
11561 if (type->base != NULL) {
11569 NULL, node, child,
11571 "mutually exclusive", NULL);
11577 } else if (type->base == NULL) {
11580 NULL, node, child,
11582 "must be present", NULL);
11632 if ( type->contentTypeDef == NULL)
11633 return (NULL);
11640 xmlSchemaFacetPtr facet, lastfacet = NULL;
11667 if (facet != NULL) {
11668 if (lastfacet == NULL)
11673 lastfacet->next = NULL;
11680 if (type->facets != NULL) {
11681 xmlSchemaFacetLinkPtr facetLink, lastFacetLink = NULL;
11687 if (facetLink == NULL) {
11688 xmlSchemaPErrMemory(ctxt, "allocating a facet link", NULL);
11690 return (NULL);
11693 facetLink->next = NULL;
11694 if (lastFacetLink == NULL)
11700 } while (facet != NULL);
11709 XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1)
11710 return(NULL);
11720 if (child != NULL) {
11724 NULL, node, child, NULL,
11730 NULL, node, child, NULL,
11739 NULL, node, child, NULL,
11746 return (NULL);
11759 * TODO: Returns the type definition or NULL in case of error
11766 xmlNodePtr child = NULL;
11769 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
11770 return (NULL);
11779 while (attr != NULL) {
11780 if (attr->ns == NULL) {
11784 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11788 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11798 if ((xmlSchemaPValAttrQName(ctxt, schema, NULL, node,
11800 (type->base == NULL)) {
11803 NULL, node, "base", NULL);
11848 if (child != NULL) {
11854 XML_SCHEMA_TYPE_EXTENSION, NULL) == -1)
11855 return(NULL);
11865 if (child != NULL) {
11870 NULL, node, child, NULL,
11877 NULL, node, child, NULL,
11882 return (NULL);
11894 * Returns the type definition or NULL in case of error
11902 xmlNodePtr child = NULL;
11905 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
11906 (hasRestrictionOrExtension == NULL))
11916 while (attr != NULL) {
11917 if (attr->ns == NULL) {
11920 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11924 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
11943 if (child == NULL) {
11946 NULL, node, NULL, NULL,
11949 if (child == NULL) {
11952 NULL, node, NULL, NULL,
11966 if (child != NULL) {
11969 NULL, node, child, NULL,
11984 * Returns the type definition or NULL in case of error
11992 xmlNodePtr child = NULL;
11995 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
11996 (hasRestrictionOrExtension == NULL))
12005 while (attr != NULL) {
12006 if (attr->ns == NULL) {
12011 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
12015 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
12038 if (child == NULL) {
12041 NULL, node, NULL,
12042 NULL, "(annotation?, (restriction | extension))");
12044 if (child == NULL) {
12047 NULL, node, NULL,
12048 NULL, "(annotation?, (restriction | extension))");
12061 if (child != NULL) {
12064 NULL, node, child,
12065 NULL, "(annotation?, (restriction | extension))");
12079 * Returns the type definition or NULL in case of error
12086 xmlNodePtr child = NULL;
12087 const xmlChar *name = NULL;
12096 if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
12097 return (NULL);
12103 if (attr == NULL) {
12105 XML_SCHEMAP_S4S_ATTR_MISSING, NULL, node, "name", NULL);
12106 return (NULL);
12107 } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr,
12109 return (NULL);
12126 NULL, ctxt->targetNamespace, node, 0);
12128 if (type == NULL)
12129 return (NULL);
12143 if (type == NULL)
12144 return (NULL);
12154 while (attr != NULL) {
12155 if (attr->ns == NULL) {
12166 NULL, (xmlNodePtr) attr))
12179 NULL, (xmlNodePtr) attr))
12196 NULL, (xmlNodePtr) attr, NULL,
12198 attrValue, NULL, NULL, NULL);
12214 NULL, (xmlNodePtr) attr, NULL,
12216 attrValue, NULL, NULL, NULL);
12221 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
12225 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
12229 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
12324 XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1)
12325 return(NULL);
12334 if (child != NULL) {
12337 NULL, node, child,
12338 NULL, "(annotation?, (simpleContent | complexContent | "
12347 NULL, node, "This is a redefinition, thus the "
12349 "grand-child", NULL);
12385 if (ctxt == NULL)
12410 if (ctxt == NULL)
12424 * Returns the parser context or NULL in case of error
12431 if (URL == NULL)
12432 return (NULL);
12435 if (ret == NULL)
12436 return(NULL);
12450 * Returns the parser context or NULL in case of error
12457 if ((buffer == NULL) || (size <= 0))
12458 return (NULL);
12460 if (ret == NULL)
12461 return(NULL);
12475 * Returns the parser context or NULL in case of error
12482 if (doc == NULL)
12483 return (NULL);
12485 if (ret == NULL)
12486 return(NULL);
12504 if (ctxt == NULL)
12506 if (ctxt->doc != NULL && !ctxt->preserve)
12508 if (ctxt->vctxt != NULL) {
12511 if (ctxt->ownsConstructor && (ctxt->constructor != NULL)) {
12513 ctxt->constructor = NULL;
12516 if (ctxt->attrProhibs != NULL)
12548 if (end == NULL)
12551 if (substGroup == NULL) {
12556 "available.\n", elemDecl->name, NULL);
12566 tmp = xmlAutomataNewCountedTrans(pctxt->am, start, NULL, counter);
12583 start, NULL,
12599 * tmp = xmlAutomataNewOnceTrans2(pctxt->am, start, NULL,
12603 tmp = xmlAutomataNewTransition2(pctxt->am, start, NULL,
12620 start, NULL,
12630 start, NULL,
12661 ret = xmlSchemaBuildContentModelForSubstGroup(ctxt, particle, -1, NULL);
12672 ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
12678 ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
12689 start = xmlAutomataNewEpsilon(ctxt->am, ctxt->state, NULL);
12691 ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
12695 NULL, counter);
12721 if (particle == NULL) {
12722 PERROR_INT("xmlSchemaBuildAContentModel", "particle is NULL");
12725 if (particle->children == NULL) {
12753 start, NULL, BAD_CAST "*", BAD_CAST "*", wild);
12760 start, NULL, BAD_CAST "*", NULL, wild);
12763 } else if (wild->nsSet != NULL) {
12768 pctxt->state, NULL, BAD_CAST "*", ns->value, wild);
12771 } while (ns != NULL);
12773 } else if (wild->negNsSet != NULL) {
12792 start, NULL, BAD_CAST "*", BAD_CAST "*", wild);
12796 start, NULL, BAD_CAST "*", NULL, wild);
12798 } else if (wild->nsSet != NULL) {
12803 start, NULL, BAD_CAST "*", ns->value, wild);
12806 } while (ns != NULL);
12808 } else if (wild->negNsSet != NULL) {
12837 while (sub != NULL) {
12852 oldstate, NULL);
12859 while (sub != NULL) {
12870 NULL, counter);
12877 oldstate, NULL);
12881 while (sub != NULL) {
12895 pctxt->state, NULL);
12908 oldstate, NULL);
12916 while (sub != NULL) {
12926 xmlAutomataNewCounterTrans(pctxt->am, tmp, NULL,
12935 while (sub != NULL) {
12964 while (sub != NULL) {
12990 while (sub != NULL) {
13019 if (sub == NULL)
13028 while (sub != NULL) {
13032 if (elemDecl == NULL) {
13078 xmlAutomataNewAllTrans(pctxt->am, pctxt->state, NULL, 0);
13099 WXS_ITEM_TYPE_NAME(particle->children), NULL);
13118 (type->contModel != NULL) ||
13127 ctxt->am = NULL;
13129 if (ctxt->am == NULL) {
13141 if (type->contModel == NULL) {
13145 "Failed to compile the content model", NULL);
13151 "The content model is not determinist", NULL);
13159 ctxt->state = NULL;
13161 ctxt->am = NULL;
13177 if ((ctxt == NULL) || (elemDecl == NULL) ||
13178 ((elemDecl != NULL) &&
13183 if ((elemDecl->subtypes == NULL) && (elemDecl->namedType != NULL)) {
13191 if (type == NULL) {
13200 if (elemDecl->substGroup != NULL) {
13209 if (substHead == NULL) {
13212 WXS_BASIC_CAST elemDecl, NULL,
13214 elemDecl->substGroupNs, XML_SCHEMA_TYPE_ELEMENT, NULL);
13228 if (elemDecl->subtypes == NULL)
13236 if ((elemDecl->subtypes == NULL) &&
13237 (elemDecl->namedType == NULL) &&
13238 (elemDecl->substGroup == NULL))
13272 lastLink = NULL;
13273 while (link != NULL) {
13280 if ((memberType == NULL) || (! WXS_IS_SIMPLE(memberType))) {
13283 name, nsName, XML_SCHEMA_TYPE_SIMPLE, NULL);
13287 if (lastLink == NULL)
13304 while (memberType != NULL) {
13306 if (link == NULL) {
13307 xmlSchemaPErrMemory(ctxt, "allocating a type link", NULL);
13311 link->next = NULL;
13312 if (lastLink == NULL)
13335 if (type == NULL)
13364 if (type == NULL)
13381 if (type == NULL)
13382 return (NULL);
13384 return (NULL);
13396 * NULL in case of error.
13402 while (type != NULL) {
13413 return (NULL);
13422 * NULL in case of error.
13429 while (type != NULL) {
13435 return (NULL);
13456 if ((source == NULL) || (dest == NULL))
13460 last = NULL;
13461 while (cur != NULL) {
13463 if (tmp == NULL)
13466 if (last == NULL)
13473 if (dest->negNsSet != NULL)
13475 if (source->negNsSet != NULL) {
13477 if (dest->negNsSet == NULL)
13481 dest->negNsSet = NULL;
13508 ((completeWild->nsSet == NULL) == (curWild->nsSet == NULL)) &&
13509 ((completeWild->negNsSet == NULL) == (curWild->negNsSet == NULL))) {
13511 if ((completeWild->negNsSet == NULL) ||
13514 if (completeWild->nsSet != NULL) {
13521 while (cur != NULL) {
13524 while (curB != NULL) {
13547 if (completeWild->nsSet != NULL) {
13549 completeWild->nsSet = NULL;
13551 if (completeWild->negNsSet != NULL) {
13553 completeWild->negNsSet = NULL;
13562 if ((completeWild->nsSet != NULL) && (curWild->nsSet != NULL)) {
13568 while (cur != NULL) {
13571 while (curB != NULL) {
13580 if (tmp == NULL)
13595 if ((completeWild->negNsSet != NULL) &&
13596 (curWild->negNsSet != NULL) &&
13598 completeWild->negNsSet->value = NULL;
13605 if (((completeWild->negNsSet != NULL) &&
13606 (completeWild->negNsSet->value != NULL) &&
13607 (curWild->nsSet != NULL)) ||
13608 ((curWild->negNsSet != NULL) &&
13609 (curWild->negNsSet->value != NULL) &&
13610 (completeWild->nsSet != NULL))) {
13614 if (completeWild->nsSet != NULL) {
13622 while (cur != NULL) {
13623 if (cur->value == NULL)
13638 if (completeWild->nsSet != NULL) {
13640 completeWild->nsSet = NULL;
13642 if (completeWild->negNsSet != NULL) {
13644 completeWild->negNsSet = NULL;
13652 if (completeWild->nsSet != NULL) {
13654 completeWild->nsSet = NULL;
13656 if (completeWild->negNsSet == NULL) {
13658 if (completeWild->negNsSet == NULL)
13661 completeWild->negNsSet->value = NULL;
13670 NULL, NULL);
13678 if (completeWild->negNsSet == NULL) {
13679 if (completeWild->nsSet != NULL) {
13681 completeWild->nsSet = NULL;
13684 if (completeWild->negNsSet == NULL)
13694 if (((completeWild->negNsSet != NULL) &&
13695 (completeWild->negNsSet->value == NULL) &&
13696 (curWild->nsSet != NULL)) ||
13697 ((curWild->negNsSet != NULL) &&
13698 (curWild->negNsSet->value == NULL) &&
13699 (completeWild->nsSet != NULL))) {
13701 if (completeWild->nsSet != NULL) {
13706 while (cur != NULL) {
13707 if (cur->value == NULL) {
13713 if (completeWild->nsSet != NULL) {
13715 completeWild->nsSet = NULL;
13717 if (completeWild->negNsSet != NULL) {
13719 completeWild->negNsSet = NULL;
13725 if (completeWild->negNsSet == NULL) {
13730 if (completeWild->nsSet != NULL) {
13732 completeWild->nsSet = NULL;
13735 if (completeWild->negNsSet == NULL)
13737 completeWild->negNsSet->value = NULL;
13768 ((completeWild->nsSet == NULL) == (curWild->nsSet == NULL)) &&
13769 ((completeWild->negNsSet == NULL) == (curWild->negNsSet == NULL))) {
13771 if ((completeWild->negNsSet == NULL) ||
13774 if (completeWild->nsSet != NULL) {
13781 while (cur != NULL) {
13784 while (curB != NULL) {
13815 if (((completeWild->negNsSet != NULL) && (curWild->nsSet != NULL)) ||
13816 ((curWild->negNsSet != NULL) && (completeWild->nsSet != NULL))) {
13819 if (completeWild->nsSet == NULL) {
13828 prev = NULL;
13830 while (cur != NULL) {
13831 if (cur->value == NULL) {
13832 if (prev == NULL)
13842 if (neg != NULL) {
13843 prev = NULL;
13845 while (cur != NULL) {
13847 if (prev == NULL)
13865 if ((completeWild->nsSet != NULL) && (curWild->nsSet != NULL)) {
13869 prev = NULL;
13870 while (cur != NULL) {
13873 while (curB != NULL) {
13881 if (prev == NULL)
13899 if ((completeWild->negNsSet != NULL) &&
13900 (curWild->negNsSet != NULL) &&
13902 (completeWild->negNsSet->value != NULL) &&
13903 (curWild->negNsSet->value != NULL)) {
13907 NULL, NULL);
13915 if ((completeWild->negNsSet != NULL) && (curWild->negNsSet != NULL) &&
13917 (completeWild->negNsSet->value == NULL)) {
13947 if ((sub->negNsSet != NULL) &&
13948 (super->negNsSet != NULL) &&
13954 if (sub->nsSet != NULL) {
13958 if (super->nsSet != NULL) {
13963 while (cur != NULL) {
13966 while (curB != NULL) {
13979 } else if (super->negNsSet != NULL) {
13986 while (cur != NULL) {
14004 *value = NULL;
14006 *val = NULL;
14008 if (attruse->defValue != NULL) {
14010 if (val != NULL)
14015 } else if ((attruse->attrDecl != NULL) &&
14016 (attruse->attrDecl->defValue != NULL)) {
14018 if (val != NULL)
14041 if (wild == NULL)
14046 else if (wild->nsSet != NULL) {
14050 while (cur != NULL) {
14055 } else if ((wild->negNsSet != NULL) && (ns != NULL) &&
14089 xmlSchemaAttributeUsePtr cur = NULL, bcur;
14094 if (uses != NULL) {
14098 if (baseUses == NULL)
14118 xmlChar *str = NULL;
14132 NULL, NULL);
14139 xmlChar *strA = NULL, *strB = NULL, *strC = NULL;
14173 &effFixed, &bEffValue, NULL);
14180 if ((bEffValue != NULL) &&
14182 const xmlChar *rEffValue = NULL;
14185 &effFixed, &rEffValue, NULL);
14196 xmlChar *str = NULL;
14207 NULL, NULL);
14225 if ((baseWild == NULL) ||
14229 xmlChar *str = NULL;
14238 NULL, NULL);
14253 if (baseUses != NULL) {
14259 if (uses != NULL) {
14272 xmlChar *strA = NULL, *strB = NULL;
14276 NULL, item,
14282 NULL);
14291 if (wild != NULL) {
14296 if (baseWild == NULL) {
14297 xmlChar *str = NULL;
14304 NULL, item,
14316 xmlChar *str = NULL;
14325 NULL, item,
14331 NULL);
14344 xmlChar *str = NULL;
14347 NULL, baseItem,
14353 NULL);
14386 xmlSchemaTypePtr baseType = NULL;
14388 xmlSchemaItemListPtr uses, baseUses, prohibs = NULL;
14390 if (type->baseType == NULL) {
14407 if (uses != NULL) {
14425 NULL) == -1)
14435 if (baseUses != NULL) {
14443 if (uses != NULL)
14480 if (uses == NULL) {
14482 if (type->attrUses == NULL)
14493 if (uses == NULL) {
14495 if (type->attrUses == NULL)
14509 type->attrUses = NULL;
14520 if (baseType->attributeWildcard != NULL) {
14525 if (type->attributeWildcard != NULL) {
14583 if (type == NULL)
14596 * returns NULL otherwise.
14601 while ((type != NULL) && (type->type == XML_SCHEMA_TYPE_SIMPLE)) {
14602 if (type->memberTypes != NULL)
14607 return (NULL);
14622 if ((particle->children == NULL) ||
14630 if (part == NULL)
14632 while (part != NULL) {
14651 if (part == NULL)
14660 } while (part != NULL);
14678 if ((particle->children == NULL) ||
14679 (particle->children->children == NULL))
14686 for (; part != NULL; part = (xmlSchemaParticlePtr) part->next) {
14687 if (part->children == NULL)
14707 for (; part != NULL; part = (xmlSchemaParticlePtr) part->next) {
14708 if (part->children == NULL)
14742 if ((particle == NULL) || (particle->minOccurs == 0) ||
14743 (particle->children == NULL))
14840 while (cur != NULL) {
14878 if ((ancestor == NULL) || (ancestor->type == XML_SCHEMA_TYPE_BASIC))
14885 "The definition is circular", NULL);
14913 if ((item == NULL) ||
14915 (item->baseType == NULL))
14943 while (member != NULL) {
14945 while ((memberType != NULL) &&
14950 WXS_BASIC_CAST ctxType, NULL,
14951 "The union type definition is circular", NULL);
14995 if (typeDef == NULL)
15001 if (typeDef->baseType == NULL) {
15004 if (typeDef->baseType == NULL) {
15009 XML_SCHEMA_TYPE_SIMPLE, NULL);
15024 if ((typeDef->subtypes == NULL) && (typeDef->base != NULL)) {
15029 if ((typeDef->subtypes == NULL) ||
15032 typeDef->subtypes = NULL;
15037 XML_SCHEMA_TYPE_SIMPLE, NULL);
15048 else if ((WXS_TYPE_CONTENTTYPE(typeDef) != NULL) &&
15051 (WXS_TYPE_PARTICLE_TERM(typeDef) != NULL) &&
15062 WXS_TYPE_PARTICLE_TERM(typeDef) = NULL;
15069 if (groupDef == NULL) {
15071 NULL, WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)),
15073 NULL);
15075 WXS_TYPE_CONTENTTYPE(typeDef) = NULL;
15076 } else if (WXS_MODELGROUPDEF_MODEL(groupDef) == NULL)
15078 WXS_TYPE_CONTENTTYPE(typeDef) = NULL;
15097 WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), NULL,
15100 NULL, NULL);
15125 xmlChar *str = NULL;
15138 if (baseType == NULL) {
15145 WXS_BASIC_CAST type, NULL,
15146 "No base type existent", NULL);
15153 WXS_BASIC_CAST type, NULL,
15165 WXS_BASIC_CAST type, NULL,
15179 WXS_BASIC_CAST type, NULL,
15180 "The variety is absent", NULL);
15192 WXS_BASIC_CAST type, NULL,
15229 xmlChar *str = NULL;
15246 WXS_BASIC_CAST type, NULL,
15260 WXS_BASIC_CAST type, NULL,
15272 if (type->facets != NULL) {
15277 if (primitive == NULL) {
15291 } while (facet != NULL);
15305 xmlSchemaTypePtr itemType = NULL;
15308 if ((itemType == NULL) || (! WXS_IS_SIMPLE(itemType))) {
15324 WXS_BASIC_CAST type, NULL,
15333 while (member != NULL) {
15337 WXS_BASIC_CAST type, NULL,
15362 WXS_BASIC_CAST type, NULL,
15374 if (type->facets != NULL) {
15384 } while (facet != NULL);
15405 WXS_BASIC_CAST type, NULL,
15419 WXS_BASIC_CAST type, NULL,
15434 if ((baseItemType == NULL) || (! WXS_IS_SIMPLE(baseItemType))) {
15442 xmlChar *strBIT = NULL, *strBT = NULL;
15445 WXS_BASIC_CAST type, NULL,
15459 if (type->facets != NULL) {
15492 } while (facet != NULL);
15511 while (member != NULL) {
15519 WXS_BASIC_CAST type, NULL,
15537 while (member != NULL) {
15542 WXS_BASIC_CAST type, NULL,
15553 if (type->facetSet != NULL) {
15556 WXS_BASIC_CAST type, NULL,
15557 "No facets allowed", NULL);
15568 WXS_BASIC_CAST type, NULL,
15581 WXS_BASIC_CAST type, NULL,
15608 if (type->memberTypes != NULL) {
15611 if ((member == NULL) && (baseMember != NULL)) {
15615 while (member != NULL) {
15616 if (baseMember == NULL) {
15622 xmlChar *strBMT = NULL, *strBT = NULL;
15626 WXS_BASIC_CAST type, NULL,
15639 if (baseMember != NULL)
15648 if (type->facets != NULL) {
15662 } while (facet != NULL);
15729 if (ctxt->vctxt == NULL) {
15730 ctxt->vctxt = xmlSchemaNewValidCtxt(NULL);
15731 if (ctxt->vctxt == NULL) {
15732 xmlSchemaPErr(ctxt, NULL,
15736 NULL, NULL);
15807 "and a particle emptiable", NULL);
15864 if ((type->baseType != NULL) &&
15873 NULL, WXS_BASIC_CAST type,
15875 "'extension'", NULL, NULL);
15915 xmlChar *str = NULL;
15919 NULL, WXS_BASIC_CAST type,
15922 NULL);
15939 if (WXS_ATTRUSE_TYPEDEF(use) != NULL) {
15944 xmlChar *str = NULL;
15948 NULL, WXS_BASIC_CAST type,
15954 NULL);
15979 if ((typeA == NULL) || (typeB == NULL))
16120 WXS_BASIC_CAST type, NULL,
16122 "contains 'extension'", NULL);
16144 if (base->attrUses != NULL) {
16151 if (type->attrUses != NULL) {
16168 xmlChar *str = NULL;
16172 NULL, WXS_BASIC_CAST type,
16181 NULL);
16198 if (base->attributeWildcard != NULL) {
16199 if (type->attributeWilcard == NULL) {
16200 xmlChar *str = NULL;
16204 NULL, type,
16213 xmlChar *str = NULL;
16217 NULL, type,
16228 if ((type->contentTypeDef != NULL) &&
16248 if (type->subtypes == NULL) {
16255 WXS_BASIC_CAST type, NULL,
16256 "The content type must specify a particle", NULL);
16281 WXS_BASIC_CAST type, NULL,
16283 "type, must either 'mixed' or 'element-only'", NULL);
16315 WXS_BASIC_CAST type, NULL,
16316 "The content type must be the simple base type", NULL);
16327 WXS_BASIC_CAST type, NULL,
16329 "contains 'extension'", NULL);
16371 "The base type must be a complex type", NULL, NULL);
16383 "contains 'restriction'", NULL, NULL);
16435 xmlChar *strA = NULL, *strB = NULL;
16441 NULL, WXS_BASIC_CAST type,
16464 WXS_BASIC_CAST type, NULL,
16466 "a simple type or 'mixed' and an emptiable particle", NULL);
16493 WXS_BASIC_CAST type, NULL,
16496 "particle", NULL);
16513 WXS_BASIC_CAST type, NULL,
16515 "base type must also be 'mixed'", NULL);
16529 WXS_BASIC_CAST type, NULL,
16530 "The type is not a valid restriction of its base type", NULL);
16595 xmlChar *str = NULL;
16616 xmlChar *str = NULL;
16624 WXS_BASIC_CAST type, NULL,
16642 if (base->contentTypeDef == NULL) {
16644 WXS_BASIC_CAST type, NULL,
16666 if (type->contentTypeDef == NULL) {
16667 xmlChar *str = NULL;
16676 WXS_BASIC_CAST type, NULL,
16690 xmlChar *str = NULL;
16694 WXS_BASIC_CAST type, NULL,
16704 WXS_BASIC_CAST type, NULL,
16817 if ((elemB->value != NULL) && (elemB->flags & XML_SCHEMAS_ELEM_FIXED) &&
16818 ((elemR->value == NULL) ||
16828 if (elemB->idcs != NULL) {
17048 if ((r->children == NULL) || (r->children->children == NULL))
17063 } while (part != NULL);
17103 if ((r->children == NULL) || (b->children == NULL) ||
17130 BAD_CAST xmlSchemaFacetTypeToString(fac2->type), NULL);
17136 msg, NULL);
17143 "differ", NULL);
17153 xmlChar *msg = NULL;
17176 WXS_BASIC_CAST facet1, NULL,
17177 (const char *) msg, NULL);
17179 if (msg != NULL)
17194 xmlSchemaFacetLinkPtr link, cur, last = NULL;
17196 flength = NULL, ftotdig = NULL, ffracdig = NULL,
17197 fmaxlen = NULL, fminlen = NULL, /* facets of the current type */
17198 fmininc = NULL, fmaxinc = NULL,
17199 fminexc = NULL, fmaxexc = NULL,
17200 bflength = NULL, bftotdig = NULL, bffracdig = NULL,
17201 bfmaxlen = NULL, bfminlen = NULL, /* facets of the base type */
17202 bfmininc = NULL, bfmaxinc = NULL,
17203 bfminexc = NULL, bfmaxexc = NULL;
17230 if ((type->facetSet == NULL) && (base->facetSet == NULL))
17234 if (last != NULL)
17235 while (last->next != NULL)
17238 for (cur = type->facetSet; cur != NULL; cur = cur->next) {
17263 for (cur = base->facetSet; cur != NULL; cur = cur->next) {
17656 for (cur = base->facetSet; cur != NULL; cur = cur->next) {
17671 while (link != NULL) {
17702 if (link == NULL) {
17705 if (link == NULL) {
17707 "deriving facets, creating a facet link", NULL);
17711 link->next = NULL;
17712 if (last == NULL)
17743 while (link != NULL) {
17750 if (subLink != NULL) {
17752 if (subLink->next != NULL) {
17756 while (subLink != NULL) {
17759 if (newLink == NULL) {
17761 NULL);
17791 if (type->facets != NULL) {
17794 for (fac = type->facets; fac != NULL; fac = fac->next) {
17846 if (type->facetSet != NULL) {
17849 for (lin = type->facetSet; lin != NULL; lin = lin->next) {
17876 for (anc = type->baseType; anc != NULL &&
17911 if (type->subtypes == NULL) {
17923 if (type->memberTypes == NULL) {
17935 if (type->baseType == NULL) {
17973 if (type->node != NULL) {
18039 if (type->baseType == NULL) {
18052 if ((type->memberTypes != NULL) &&
18082 * type->name, NULL);
18090 if ((type->facetSet != NULL) ||
18091 (type->baseType->facetSet != NULL)) {
18127 if (baseType == NULL) {
18157 (baseType->contentTypeDef != NULL) &&
18168 if (type->contentTypeDef != NULL) {
18177 type->contentTypeDef = NULL;
18203 XML_SCHEMA_TYPE_SIMPLE, NULL, type->targetNamespace,
18206 if (content == NULL)
18219 type->facets = NULL;
18221 type->facetSet = NULL;
18243 if ((type->contentTypeDef == NULL) ||
18244 (type->contentTypeDef->baseType == NULL)) {
18250 WXS_BASIC_CAST type, NULL,
18263 if (baseType->contentTypeDef == NULL) {
18270 WXS_BASIC_CAST type, NULL,
18290 WXS_BASIC_CAST type, NULL,
18310 if ((particle == NULL) ||
18316 ( ((xmlSchemaTreeItemPtr) particle->children)->children == NULL))) {
18327 if ((particle == NULL) ||
18334 if (particle == NULL)
18342 if (particle->children == NULL)
18411 if ((WXS_TYPE_PARTICLE(type) != NULL) &&
18412 (WXS_TYPE_PARTICLE_TERM(type) != NULL) &&
18422 WXS_ITEM_NODE(type), NULL,
18429 NULL, NULL);
18431 } else if ((WXS_TYPE_PARTICLE(baseType) != NULL) &&
18432 (WXS_TYPE_PARTICLE_TERM(baseType) != NULL) &&
18442 WXS_ITEM_NODE(type), NULL,
18449 NULL, NULL);
18459 if (particle == NULL)
18467 if (particle->children == NULL)
18481 if (particle->children->children == NULL)
18571 if (type == NULL)
18591 * @pctxt: the schema parser context or NULL
18607 if ((facet == NULL) || (typeDecl == NULL))
18613 if (pctxt == NULL)
18650 if (base == NULL) {
18663 if (pctxt == NULL)
18681 XML_SCHEMAP_INTERNAL, facet->node, NULL,
18692 xmlChar *str = NULL;
18704 } else if (facet->val == NULL) {
18715 if (facet->regexp == NULL) {
18723 facet->value, NULL);
18763 NULL);
18783 "valid", facet->value, NULL);
18791 if ((! ctxtGiven) && (pctxt != NULL))
18795 if ((! ctxtGiven) && (pctxt != NULL))
18817 if (typeDecl->facets != NULL) {
18824 if (pctxt->vctxt == NULL) {
18829 while (facet != NULL) {
18834 pctxt->vctxt->schema = NULL;
18853 * otherwise NULL.
18859 xmlSchemaTreeItemPtr circ = NULL;
18863 for (; particle != NULL; particle = particle->next) {
18865 if (term == NULL)
18878 if (gdef->children != NULL) {
18883 if (circ != NULL)
18891 if (circ != NULL)
18898 return (NULL);
18919 if ((item == NULL) ||
18921 (item->children == NULL))
18927 if (circ != NULL) {
18928 xmlChar *str = NULL;
18938 NULL, WXS_ITEM_NODE(circ),
18947 circ->children = NULL;
18973 while (particle != NULL) {
18974 if ((WXS_PARTICLE_TERM(particle) == NULL) ||
18981 if (WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)) == NULL) {
18985 WXS_PARTICLE_TERM(particle) = NULL;
19007 * Returns the circular attribute grou reference, otherwise NULL.
19024 (ref->item != NULL))
19042 if (circ != NULL)
19048 return (NULL);
19077 if (attrGr->attrUses == NULL)
19086 if (circ != NULL) {
19087 xmlChar *str = NULL;
19093 NULL, WXS_ITEM_NODE(WXS_BASIC_CAST circ),
19102 circ->item = NULL;
19138 int created = (*completeWild == NULL) ? 0 : 1;
19147 if (prohibs == NULL) {
19171 if ((WXS_QNAME_CAST use)->item == NULL)
19187 if (gr->attributeWildcard != NULL) {
19188 if (*completeWild == NULL) {
19205 if (tmpWild == NULL)
19225 if ((sublist == NULL) || sublist->nbItems == 0) {
19260 xmlChar *str = NULL;
19264 prohib->node, NULL,
19270 NULL, NULL);
19301 if ((attrGr->attrUses == NULL) ||
19307 &(attrGr->attributeWildcard), attrGr->attrUses, NULL) == -1)
19335 if ((attrGr->attrUses != NULL) &&
19358 xmlChar *str = NULL;
19365 NULL);
19383 if (WXS_ATTRUSE_TYPEDEF(use) != NULL) {
19388 xmlChar *str = NULL;
19398 NULL);
19426 if (ref->item != NULL)
19431 if (group == NULL) {
19434 NULL, ref->node,
19436 ref->itemType, NULL);
19470 if (WXS_ATTR_TYPEDEF(attr) == NULL)
19473 if (attr->defValue != NULL) {
19486 NULL, WXS_BASIC_CAST attr,
19489 NULL, NULL);
19512 NULL, WXS_BASIC_CAST attr,
19514 NULL, NULL);
19528 if (WXS_SUBST_HEAD(ancestor) == NULL)
19529 return (NULL);
19534 return (NULL);
19567 if (WXS_SUBST_HEAD(elemDecl) != NULL) {
19578 WXS_BASIC_CAST elemDecl, NULL,
19580 "substitution group affiliation", NULL);
19591 else if (WXS_SUBST_HEAD(head) != NULL)
19594 circ = NULL;
19595 if (circ != NULL) {
19596 xmlChar *strA = NULL, *strB = NULL;
19600 WXS_BASIC_CAST circ, NULL,
19605 NULL);
19635 xmlChar *strA = NULL, *strB = NULL, *strC = NULL;
19640 WXS_BASIC_CAST elemDecl, NULL,
19661 if ((elemDecl->value != NULL) &&
19672 WXS_BASIC_CAST elemDecl, NULL,
19675 "conjunction with such a type definition", NULL);
19676 } else if (elemDecl->value != NULL) {
19678 xmlNodePtr node = NULL;
19686 if (typeDef == NULL) {
19691 "the value constraint", NULL, NULL);
19694 if (elemDecl->node != NULL) {
19741 if ((WXS_SUBST_HEAD(elemDecl) == NULL) ||
19754 for (head = WXS_SUBST_HEAD(elemDecl); head != NULL;
19789 while ((type != NULL) && (type != headType)) {
19805 while (type != NULL) {
19858 if (curParticle == NULL) {
19861 if (WXS_PARTICLE_TERM(curParticle) == NULL) {
19868 while (cur != NULL) {
19896 xmlChar *strA = NULL, *strB = NULL;
19901 WXS_ITEM_NODE(cur), NULL,
19924 while (sub != NULL) {
19942 WXS_ITEM_TYPE_NAME(WXS_PARTICLE_TERM(cur)), NULL);
19966 if (elemDecl == NULL)
19999 while (particle != NULL) {
20000 if ((WXS_PARTICLE_TERM(particle) == NULL) ||
20009 * NULL the {term} by default.
20011 particle->children = NULL;
20015 if (refItem == NULL) {
20017 NULL, WXS_ITEM_NODE(particle), "ref", ref->name,
20018 ref->targetNamespace, ref->itemType, NULL);
20023 if (WXS_MODELGROUPDEF_MODEL(refItem) == NULL)
20048 WXS_ITEM_NODE(particle), NULL,
20052 NULL, NULL);
20076 while (x != NULL) {
20116 if (x != NULL) {
20118 if (y == NULL)
20120 } else if (xmlSchemaValueGetNext(y) != NULL)
20139 if ((ctxt == NULL) || (ause == NULL))
20141 if ((ause->attrDecl == NULL) ||
20154 if (ause->attrDecl == NULL) {
20159 XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
20179 if ((ctxt == NULL) || (use == NULL))
20181 if ((use->defValue == NULL) || (WXS_ATTRUSE_DECL(use) == NULL) ||
20193 if (((WXS_ATTRUSE_DECL(use))->defValue != NULL) &&
20199 WXS_BASIC_CAST use, NULL,
20203 NULL);
20209 if ((use->defVal != NULL) && (WXS_ATTRUSE_TYPEDEF(use) != NULL)) {
20223 NULL, WXS_BASIC_CAST use,
20226 NULL, NULL);
20242 NULL, WXS_BASIC_CAST use,
20244 NULL, NULL);
20255 if (((WXS_ATTRUSE_DECL(use))->defVal != NULL) &&
20263 WXS_BASIC_CAST use, NULL,
20297 if (item->subtypes != NULL)
20299 if (item->typeName != NULL) {
20304 if ((type == NULL) || (! WXS_IS_SIMPLE(type))) {
20309 XML_SCHEMA_TYPE_SIMPLE, NULL);
20339 if (idc->ref->name != NULL) {
20343 if (idc->ref->item == NULL) {
20353 XML_SCHEMA_TYPE_IDC_KEY, NULL);
20361 NULL, WXS_BASIC_CAST idc,
20363 NULL, NULL);
20364 idc->ref->item = NULL;
20369 xmlChar *str = NULL;
20381 NULL, WXS_BASIC_CAST idc,
20386 NULL);
20400 prohib->targetNamespace) == NULL) {
20404 NULL, prohib->node,
20406 XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
20429 if (redef == NULL)
20450 if (prev == NULL) {
20451 xmlChar *str = NULL;
20479 XML_SCHEMAP_SRC_REDEFINE, node, NULL,
20524 if (redef->reference != NULL) {
20543 if (redef->reference != NULL) {
20551 redef->target = NULL;
20569 xmlChar *str = NULL;
20580 node, NULL,
20584 NULL);
20591 } while (redef != NULL);
20603 if (redef == NULL)
20607 if (redef->target == NULL) {
20618 * type to be 'absent', we'll NULL it.
20620 (WXS_TYPE_CAST redef->target)->name = NULL;
20667 } while (redef != NULL);
20700 if (bucket == NULL)
20708 table = NULL;
20752 if (*table == NULL) {
20754 if (*table == NULL) {
20762 xmlChar *str = NULL;
20777 if (bucket->relations != NULL) {
20780 if ((rel->bucket != NULL) &&
20786 } while (rel != NULL);
20803 if ((con->pending == NULL) ||
20814 if (con->bucket == NULL)
20835 pctxt->ctxtType = NULL;
21041 if (((xmlSchemaTypePtr) item)->memberTypes != NULL) {
21098 if (((xmlSchemaAttributeUsePtr)item)->defValue != NULL) {
21118 if (( (WXS_ATTR_GROUP_CAST item)->attrUses != NULL) &&
21135 if (WXS_CONSTRUCTOR(pctxt)->redefs != NULL)
21187 if ((WXS_ELEM_TYPEDEF(elemDecl) != NULL) &&
21194 NULL, NULL, 0);
21243 if (con->substGroups != NULL) {
21246 con->substGroups = NULL;
21248 if (con->redefs != NULL) {
21250 con->redefs = NULL;
21262 * NULL in case of error
21267 xmlSchemaPtr mainSchema = NULL;
21268 xmlSchemaBucketPtr bucket = NULL;
21278 if (ctxt == NULL)
21279 return (NULL);
21288 if (mainSchema == NULL)
21293 if (ctxt->constructor == NULL) {
21295 if (ctxt->constructor == NULL)
21296 return(NULL);
21305 ctxt->URL, ctxt->doc, ctxt->buffer, ctxt->size, NULL,
21306 NULL, NULL, &bucket);
21312 if (bucket == NULL) {
21316 NULL, NULL,
21318 ctxt->URL, NULL);
21321 NULL, NULL,
21323 NULL, NULL);
21348 mainSchema = NULL;
21352 ctxt->constructor = NULL;
21356 ctxt->schema = NULL;
21365 mainSchema = NULL;
21369 ctxt->constructor = NULL;
21374 ctxt->schema = NULL;
21375 return(NULL);
21392 if (ctxt == NULL)
21397 if (ctxt->vctxt != NULL)
21414 if (ctxt == NULL)
21418 if (ctxt->vctxt != NULL)
21438 if (ctxt == NULL)
21440 if (err != NULL)
21442 if (warn != NULL)
21444 if (ctx != NULL)
21571 xmlSchemaBucketPtr bucket = NULL;
21573 if ((vctxt == NULL) || (schema == NULL))
21576 if (vctxt->pctxt == NULL) {
21582 if (pctxt->constructor == NULL) {
21598 location, NULL, NULL, 0, node, NULL, nsName,
21602 if (bucket == NULL) {
21607 node, NULL,
21609 location, NULL, NULL);
21616 if ((bucket != NULL) &&
21617 (WXS_CONSTRUCTOR(pctxt)->bucket == NULL))
21623 if ((bucket == NULL) || (! CAN_PARSE_SCHEMA(bucket)))
21635 pctxt->doc = NULL;
21661 pctxt->doc = NULL;
21664 pctxt->doc = NULL;
21673 return (NULL);
21685 return (NULL);
21704 const xmlChar *nsname = NULL, *location;
21719 if (iattr == NULL)
21722 if (iattr == NULL)
21761 iattr->node, NULL,
21763 "name and the document's URI", NULL, NULL, NULL);
21785 if (vctxt->sax != NULL) {
21793 if (((prefix == NULL) &&
21794 (inode->nsBindings[j] == NULL)) ||
21795 ((prefix != NULL) && xmlStrEqual(prefix,
21807 return (NULL);
21809 } else if (vctxt->reader != NULL) {
21813 if (nsName != NULL) {
21820 return (NULL);
21825 if ((vctxt->inode->node == NULL) ||
21826 (vctxt->inode->node->doc == NULL)) {
21829 return (NULL);
21833 if (ns != NULL)
21835 return (NULL);
21852 if (vctxt && (vctxt->schema == NULL)) {
21861 xmlChar *localName = NULL;
21862 xmlChar *prefix = NULL;
21865 if (prefix != NULL) {
21866 const xmlChar *nsName = NULL;
21868 if (vctxt != NULL)
21870 else if (node != NULL) {
21872 if (ns != NULL)
21879 if (nsName == NULL) {
21884 if (xmlSchemaGetNotation(schema, localName, nsName) != NULL) {
21885 if ((valNeeded) && (val != NULL)) {
21888 if (*val == NULL)
21896 if (xmlSchemaGetNotation(schema, value, NULL) != NULL) {
21897 if (valNeeded && (val != NULL)) {
21899 BAD_CAST xmlStrdup(value), NULL);
21900 if (*val == NULL)
21918 if (lname == NULL)
21920 if (nsname != NULL) {
21922 if (nsname == NULL)
21950 * Returns the item, or NULL on internal errors.
21959 if (aidc == NULL) {
21962 NULL);
21967 aidc->next = NULL;
21968 if (vctxt->aidcs == NULL)
21990 if (imported->schema->idcDef != NULL) {
22002 * Returns the new IDC binding, NULL on internal errors.
22011 if (ret == NULL) {
22012 xmlSchemaVErrMemory(NULL,
22013 "allocating a PSVI IDC binding item", NULL);
22014 return (NULL);
22039 if (vctxt->idcNodes == NULL) {
22042 if (vctxt->idcNodes == NULL) {
22044 "allocating the IDC node table item list", NULL);
22053 if (vctxt->idcNodes == NULL) {
22055 "re-allocating the IDC node table item list", NULL);
22080 if (vctxt->idcKeys == NULL) {
22083 if (vctxt->idcKeys == NULL) {
22085 "allocating the IDC key storage list", NULL);
22094 if (vctxt->idcKeys == NULL) {
22096 "re-allocating the IDC key storage list", NULL);
22118 if (bind->nodeTable == NULL) {
22122 if (bind->nodeTable == NULL) {
22123 xmlSchemaVErrMemory(NULL,
22124 "allocating an array of IDC node-table items", NULL);
22132 if (bind->nodeTable == NULL) {
22133 xmlSchemaVErrMemory(NULL,
22134 "re-allocating an array of IDC node-table items", NULL);
22151 * Returns an IDC binding or NULL on internal errors.
22161 if (ielem->idcTable == NULL) {
22163 if (ielem->idcTable == NULL)
22164 return (NULL);
22167 xmlSchemaPSVIIDCBindingPtr bind = NULL;
22173 if (bind->next == NULL) {
22175 if (bind->next == NULL)
22176 return (NULL);
22180 } while (bind != NULL);
22182 return (NULL);
22189 if (matcher->targets == NULL)
22203 if (key->val != NULL)
22217 if (bind->nodeTable != NULL)
22219 if (bind->dupls != NULL)
22235 while (bind != NULL) {
22253 while (matcher != NULL) {
22255 if (matcher->keySeqs != NULL) {
22258 if (matcher->keySeqs[i] != NULL)
22262 if (matcher->targets != NULL) {
22298 while (matcher != NULL) {
22300 if (matcher->keySeqs != NULL) {
22306 if (matcher->keySeqs[i] != NULL) {
22308 matcher->keySeqs[i] = NULL;
22328 matcher->targets = NULL;
22330 matcher->next = NULL;
22334 if (vctxt->idcMatcherCache != NULL)
22367 if (vctxt->xpathStatePool != NULL) {
22370 sto->next = NULL;
22376 if (sto == NULL) {
22377 xmlSchemaVErrMemory(NULL,
22378 "allocating an IDC state object", NULL);
22386 if (vctxt->xpathStates != NULL)
22393 if (sto->xpathCtxt != NULL)
22401 if (sto->xpathCtxt == NULL) {
22433 xmlSchemaIDCStateObjPtr sto, head = NULL, first;
22436 if (vctxt->xpathStates == NULL)
22443 xmlChar *str = NULL;
22489 if (sto->history == NULL) {
22491 if (sto->history == NULL) {
22492 xmlSchemaVErrMemory(NULL,
22493 "allocating the state object history", NULL);
22501 if (sto->history == NULL) {
22502 xmlSchemaVErrMemory(NULL,
22503 "re-allocating the state object history", NULL);
22525 while (sel != NULL) {
22551 if (sto->next == NULL) {
22570 xmlChar *value = NULL;
22589 if (value != NULL) {
22591 value = NULL;
22613 if (vctxt->xpathStates == NULL)
22621 } while (sto != NULL);
22642 xmlSchemaPSVIIDCKeyPtr key = NULL;
22643 xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL;
22645 if (vctxt->xpathStates == NULL)
22651 xmlChar *str = NULL;
22662 while (sto != NULL) {
22698 if (simpleType == NULL) {
22705 simpleType = NULL;
22708 if (simpleType == NULL) {
22709 xmlChar *str = NULL;
22716 XML_SCHEMAV_CVC_IDC, NULL,
22727 if ((key == NULL) && (vctxt->inode->val == NULL)) {
22750 * <scope> 0 NULL
22751 * <bar> 1 NULL
22767 if (matcher->keySeqs == NULL) {
22775 if (matcher->keySeqs == NULL) {
22776 xmlSchemaVErrMemory(NULL,
22778 NULL);
22792 if (matcher->keySeqs == NULL) {
22793 xmlSchemaVErrMemory(NULL,
22795 NULL);
22803 matcher->keySeqs[i] = NULL;
22810 if (keySeq == NULL) {
22812 } else if (keySeq[idx] != NULL) {
22813 xmlChar *str = NULL;
22825 XML_SCHEMAV_CVC_IDC, NULL,
22844 if (keySeq == NULL) {
22845 xmlSchemaVErrMemory(NULL,
22846 "allocating an IDC key-sequence", NULL);
22856 if (key == NULL) {
22859 if (key == NULL) {
22860 xmlSchemaVErrMemory(NULL,
22861 "allocating a IDC key", NULL);
22863 matcher->keySeqs[pos] = NULL;
22871 vctxt->inode->val = NULL;
22884 xmlSchemaPSVIIDCKeyPtr **keySeq = NULL;
22910 if ((matcher->keySeqs == NULL) ||
22919 if (*keySeq == NULL) {
22927 if ((*keySeq)[i] == NULL) {
22992 xmlChar *str = NULL, *strB = NULL;
22997 XML_SCHEMAV_CVC_IDC, NULL,
23013 if (ntItem == NULL) {
23014 xmlSchemaVErrMemory(NULL,
23015 "allocating an IDC node-table item", NULL);
23017 *keySeq = NULL;
23029 *keySeq = NULL;
23043 *keySeq = NULL;
23054 *keySeq = NULL;
23073 xmlChar *str = NULL;
23081 XML_SCHEMAV_CVC_IDC, NULL,
23084 xmlSchemaGetIDCDesignation(&str, idc), NULL);
23091 if ((keySeq != NULL) && (*keySeq != NULL)) {
23093 *keySeq = NULL;
23126 } /* while (sto != NULL) */
23144 xmlSchemaIDCMatcherPtr matcher, last = NULL;
23149 if (idc == NULL)
23154 xmlChar *str = NULL;
23162 if (vctxt->inode->idcMatchers != NULL) {
23177 if (refIdc != NULL) {
23186 while (aidc != NULL) {
23191 if (aidc == NULL) {
23206 while (aidc != NULL) {
23211 if (aidc == NULL) {
23219 if (vctxt->idcMatcherCache != NULL) {
23225 matcher->nextCached = NULL;
23229 if (matcher == NULL) {
23231 "allocating an IDC matcher", NULL);
23236 if (last == NULL)
23257 } while (idc != NULL);
23272 while (matcher != NULL) {
23302 dupls = NULL;
23305 if (bind->nodeTable != NULL) {
23320 matcher->targets->items = NULL;
23408 if (bind->dupls == NULL) {
23410 if (bind->dupls == NULL)
23461 xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL; /* parent IDC bindings. */
23462 xmlSchemaPSVIIDCNodePtr node, parNode = NULL, *dupls, *parNodes; /* node-table entries. */
23467 if (bind == NULL) {
23477 while (bind != NULL) {
23495 } while (aidc != NULL);
23498 if (parTable != NULL)
23504 while (parBind != NULL) {
23510 if (parBind != NULL) {
23521 dupls = NULL;
23530 if (node == NULL)
23625 if (parBind->dupls == NULL) {
23627 if (parBind->dupls == NULL)
23636 if (parBind->nodeTable == NULL) {
23639 if (parBind->nodeTable == NULL) {
23640 xmlSchemaVErrMemory(NULL,
23641 "allocating IDC list of node-table items", NULL);
23650 if (parBind->nodeTable == NULL) {
23651 xmlSchemaVErrMemory(NULL,
23652 "re-allocating IDC list of node-table items", NULL);
23673 if (parBind == NULL)
23692 bind->nodeTable = NULL;
23704 if (parBind->nodeTable == NULL) {
23705 xmlSchemaVErrMemory(NULL,
23707 "items", NULL);
23721 if (parBind->dupls != NULL)
23724 bind->dupls = NULL;
23726 if (parTable != NULL) {
23727 if (*parTable == NULL)
23762 while (matcher != NULL) {
23769 xmlSchemaPSVIIDCNodePtr refNode = NULL;
23777 while (bind != NULL) {
23790 if (bind != NULL) {
23830 xmlChar *str = NULL, *strB = NULL;
23849 xmlChar *str = NULL, *strB = NULL;
23881 if (vctxt->attrInfos == NULL) {
23885 if (vctxt->attrInfos == NULL) {
23887 "allocating attribute info list", NULL);
23888 return (NULL);
23895 if (vctxt->attrInfos == NULL) {
23897 "re-allocating attribute info list", NULL);
23898 return (NULL);
23902 if (iattr->localName != NULL) {
23905 return (NULL);
23915 if (iattr == NULL) {
23916 xmlSchemaVErrMemory(vctxt, "creating new attribute info", NULL);
23917 return (NULL);
23939 if (attr == NULL) {
23954 if (nsName != NULL) {
23998 ielem->localName = NULL;
23999 ielem->nsName = NULL;
24004 ielem->value = NULL;
24006 if (ielem->val != NULL) {
24012 ielem->val = NULL;
24014 if (ielem->idcMatchers != NULL) {
24023 ielem->idcMatchers = NULL;
24025 if (ielem->idcTable != NULL) {
24030 ielem->idcTable = NULL;
24032 if (ielem->regexCtxt != NULL) {
24034 ielem->regexCtxt = NULL;
24036 if (ielem->nsBindings != NULL) {
24038 ielem->nsBindings = NULL;
24051 * Returns the element info item or NULL on API or internal errors.
24056 xmlSchemaNodeInfoPtr info = NULL;
24061 return (NULL);
24063 if (vctxt->elemInfos == NULL) {
24066 if (vctxt->elemInfos == NULL) {
24068 "allocating the element info array", NULL);
24069 return (NULL);
24080 if (vctxt->elemInfos == NULL) {
24082 "re-allocating the element info array", NULL);
24083 return (NULL);
24090 vctxt->elemInfos[i] = NULL;
24094 if (info == NULL) {
24097 if (info == NULL) {
24099 "allocating an element info", NULL);
24100 return (NULL);
24104 if (info->localName != NULL) {
24107 return (NULL);
24150 if (type->facetSet == NULL)
24174 if (val == NULL)
24180 for (facetLink = type->facetSet; facetLink != NULL;
24209 value, len, type, facetLink->facet, NULL, NULL, NULL);
24225 for (facetLink = type->facetSet; facetLink != NULL;
24233 value, length, NULL);
24245 value, length, type, facetLink->facet, NULL, NULL, NULL);
24267 for (facet = tmpType->facets; facet != NULL; facet = facet->next) {
24291 } while ((tmpType != NULL) &&
24297 value, 0, type, NULL, NULL, NULL, NULL);
24312 facet = NULL;
24315 for (facetLink = tmpType->facetSet; facetLink != NULL;
24342 value, 0, type, facet, NULL, NULL, NULL);
24350 } while ((tmpType != NULL) && (tmpType->type != XML_SCHEMA_TYPE_BASIC));
24366 return (NULL);
24378 xmlChar *local, *prefix = NULL;
24394 if (local == NULL)
24403 if (prefix != NULL) {
24407 * NOT NULL.
24409 if (nsName == NULL) {
24411 xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL,
24415 "scope", value, NULL);
24416 if (local != NULL)
24422 if (nsName != NULL)
24426 *val = xmlSchemaNewQNameValue(NULL,
24447 xmlSchemaValPtr val = NULL;
24449 xmlChar *normValue = NULL;
24455 if (normValue != NULL) \
24460 if ((retVal != NULL) && (*retVal != NULL)) {
24462 *retVal = NULL;
24488 if (value == NULL)
24505 while ((biType != NULL) &&
24509 if (biType == NULL) {
24526 NULL, value, &val, valNeeded);
24539 value, NULL, node);
24545 ret = xmlSchemaValidateNotation(NULL,
24556 value, NULL, node);
24602 xmlChar *tmpValue = NULL;
24604 xmlSchemaValPtr prevVal = NULL, curVal = NULL;
24636 tmpValue, NULL, fireErrors, 0, 1);
24638 if (curVal != NULL) {
24642 if (val == NULL)
24647 curVal = NULL;
24704 if (memberLink == NULL) {
24715 while (memberLink != NULL) {
24721 memberLink->type, value, NULL, 0, 1, 0);
24760 if (normValue != NULL)
24763 if (retVal != NULL)
24765 else if (val != NULL)
24767 } else if (val != NULL)
24771 if (normValue != NULL)
24773 if (val != NULL)
24786 if ((nsName == NULL) || (localName == NULL))
24788 *nsName = NULL;
24789 *localName = NULL;
24796 XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL,
24801 xmlChar *local = NULL;
24809 if (local == NULL)
24818 if (prefix != NULL) {
24821 * A namespace must be found if the prefix is NOT NULL.
24823 if (*nsName == NULL) {
24825 XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL,
24829 value, NULL);
24851 if (localType == NULL)
24853 *localType = NULL;
24854 if (iattr == NULL)
24857 const xmlChar *nsName = NULL, *local = NULL;
24883 if (*localType == NULL) {
24884 xmlChar *str = NULL;
24887 XML_SCHEMAV_CVC_ELT_4_2, NULL,
24891 xmlSchemaFormatQName(&str, nsName, local), NULL);
24896 if (elemDecl != NULL) {
24935 * if ((vctxt->pctxt == NULL) &&
24942 xmlChar *str = NULL;
24945 XML_SCHEMAV_CVC_ELT_4_3, NULL, NULL,
24952 NULL);
24955 *localType = NULL;
24976 if (elemDecl == NULL) {
24977 VERROR(XML_SCHEMAV_CVC_ELT_1, NULL,
24986 VERROR(XML_SCHEMAV_CVC_ELT_2, NULL,
24990 if (actualType == NULL) {
24991 VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
25010 ACTXT_CAST vctxt, NULL,
25025 VERROR(XML_SCHEMAV_CVC_ELT_3_1, NULL,
25034 (elemDecl->value != NULL)) {
25035 VERROR(XML_SCHEMAV_CVC_ELT_3_2_2, NULL,
25054 xmlSchemaTypePtr localType = NULL;
25067 if (localType != NULL) {
25076 if ((elemDecl->idcs != NULL) &&
25082 if (actualType == NULL) {
25083 VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
25115 XML_SCHEMAV_CVC_TYPE_3_1_1, iattr, NULL);
25137 if (attr->localName != NULL)
25139 if (attr->nsName != NULL)
25143 if (attr->value != NULL)
25146 if (attr->val != NULL) {
25148 attr->val = NULL;
25170 xmlSchemaAttributeUsePtr attrUse = NULL;
25171 xmlSchemaAttributePtr attrDecl = NULL;
25175 xmlNodePtr defAttrOwnerElem = NULL;
25201 if (attrUseList != NULL)
25264 if (tmpiattr == NULL) {
25274 ((attrUse->defValue != NULL) ||
25275 (attrDecl->defValue != NULL))) {
25280 if (tmpiattr == NULL) {
25300 if (type->attributeWildcard != NULL) {
25351 if (iattr->decl != NULL) {
25387 if (attrUseList != NULL) {
25443 if (iattr->typeDef == NULL) {
25452 if (vctxt->xpathStates != NULL) {
25472 if (iattr->use->defValue != NULL) {
25483 if (iattr->val == NULL) {
25490 if (iattr->val == NULL) {
25512 if (normValue != NULL)
25515 if (iattr->nsName == NULL) {
25517 iattr->localName, value) == NULL) {
25520 if (normValue != NULL)
25529 if (ns == NULL) {
25546 if (normValue != NULL)
25550 } while (ns != NULL);
25562 if (normValue != NULL)
25573 if (vctxt->value != NULL) {
25578 vctxt->value = NULL;
25585 ((iattr->use != NULL) &&
25611 iattr->node, iattr->typeDef, iattr->value, NULL,
25646 if (iattr->val == NULL) {
25651 if ((iattr->use != NULL) &&
25652 (iattr->use->defValue != NULL)) {
25653 if (iattr->use->defVal == NULL) {
25668 if (iattr->decl->defVal == NULL) {
25698 } else if (vctxt->xpathStates != NULL)
25715 xmlChar *str = NULL;
25718 XML_SCHEMAV_CVC_COMPLEX_TYPE_4, NULL, NULL,
25723 NULL);
25728 VERROR(XML_SCHEMAV_CVC_ATTRIBUTE_2, NULL,
25733 XML_SCHEMAV_CVC_AU, NULL, NULL,
25739 VERROR(XML_SCHEMAV_CVC_WILDCARD, NULL,
25750 if (type->attributeWildcard == NULL) {
25752 XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, iattr, NULL);
25755 XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, iattr, NULL);
25779 if ((skip == NULL) || (wild == NULL) ||
25795 xmlSchemaElementPtr decl = NULL;
25799 if (decl != NULL) {
25806 VERROR(XML_SCHEMAV_CVC_ELT_1, NULL, /* WXS_BASIC_CAST wild */
25821 if (iattr != NULL) {
25823 &(vctxt->inode->typeDef), NULL) == -1) {
25881 VERROR(ret, NULL,
25902 NULL, inode->typeDef, value, val, 1, 1, 0);
25907 NULL, inode->typeDef->contentTypeDef, value, val, 1, 1, 0);
25925 xmlChar *str = NULL;
25948 if (vctxt->inode == NULL) {
25965 ACTXT_CAST vctxt, NULL,
25969 ACTXT_CAST vctxt, NULL,
25970 type, value, NULL, 1, 0, 0));
25995 if ((inode->typeDef == NULL) ||
26020 if (inode->regexCtxt == NULL) {
26028 if (inode->regexCtxt == NULL) {
26044 ret = xmlRegExecPushString(inode->regexCtxt, NULL, NULL);
26053 XML_SCHEMAV_ELEMENT_CONTENT, NULL, NULL,
26080 if (vctxt->value != NULL) {
26082 vctxt->value = NULL;
26087 if (inode->decl == NULL) {
26116 if ((inode->decl->value != NULL) &&
26180 (inode->node != NULL)) {
26188 if (normValue != NULL) {
26193 if (textChild == NULL) {
26246 if ((inode->decl->value != NULL) &&
26260 VERROR(ret, NULL,
26288 ret, NULL, NULL,
26311 ret, NULL, NULL,
26352 if ((inode->idcMatchers != NULL) &&
26367 if (inode->idcTable != NULL) {
26395 vctxt->inode = NULL;
26401 if (vctxt->aidcs != NULL) {
26413 } while (aidc != NULL);
26456 VERROR(ret, NULL,
26475 if (vctxt->inode->decl == NULL) {
26483 if (iattr != NULL) {
26485 &(vctxt->inode->typeDef), NULL);
26522 VERROR(ret, NULL,
26537 if (ptype->contModel == NULL) {
26553 if (regexCtxt == NULL) {
26560 if (regexCtxt == NULL) {
26600 xmlRegExecErrInfo(regexCtxt, NULL, &nbval, &nbneg,
26603 XML_SCHEMAV_ELEMENT_CONTENT, NULL,NULL,
26623 VERROR(ret, NULL, "Element content is not allowed, "
26631 VERROR(ret, NULL, "Element content is not allowed, "
26672 if (consumed != NULL)
26680 VERROR(XML_SCHEMAV_CVC_ELT_3_2_1, NULL,
26692 VERROR(XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, NULL,
26710 VERROR(XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, NULL,
26718 if ((value == NULL) || (value[0] == 0))
26726 ((vctxt->inode->decl == NULL) ||
26727 (vctxt->inode->decl->value == NULL)))
26730 if (vctxt->inode->value == NULL) {
26747 if (consumed != NULL)
26837 if ((vctxt->inode->decl == NULL) &&
26838 (vctxt->inode->typeDef == NULL)) {
26851 if (vctxt->inode->decl == NULL) {
26853 VERROR(ret, NULL,
26860 if (vctxt->inode->decl == NULL)
26889 vctxt->inode->decl = NULL;
26910 if (vctxt->inode->typeDef == NULL) {
26913 VERROR(ret, NULL,
26920 VERROR(ret, NULL,
26929 if (vctxt->xpathStates != NULL) {
26943 (vctxt->inode->typeDef->attrUses != NULL)) {
27041 if (xmlSchemaValidatorPushAttribute(vctxt, NULL,
27124 ielem = NULL;
27190 XML_SCHEMA_PUSH_TEXT_VOLATILE, NULL) == -1) {
27215 XML_SCHEMA_PUSH_TEXT_VOLATILE, NULL) == -1) {
27290 if (ielem->nsBindings == NULL) {
27294 if (ielem->nsBindings == NULL) {
27297 NULL);
27308 if (ielem->nsBindings == NULL) {
27311 NULL);
27321 ielem->nsBindings[ielem->nbNsBindings * 2 + 1] = NULL;
27346 NULL, ielem->nodeLine, attributes[j], attributes[j+2], 0,
27432 * Returns the validation context or NULL in case of error
27440 if (ret == NULL) {
27441 xmlSchemaVErrMemory(NULL, "allocating validation context", NULL);
27442 return (NULL);
27462 if (vctxt == NULL)
27471 vctxt->validationRoot = NULL;
27472 vctxt->doc = NULL;
27474 vctxt->reader = NULL;
27478 if (vctxt->value != NULL) {
27480 vctxt->value = NULL;
27485 if (vctxt->aidcs != NULL) {
27491 } while (cur != NULL);
27492 vctxt->aidcs = NULL;
27494 if (vctxt->idcMatcherCache != NULL) {
27502 vctxt->idcMatcherCache = NULL;
27506 if (vctxt->idcNodes != NULL) {
27516 vctxt->idcNodes = NULL;
27523 if (vctxt->xpathStates != NULL) {
27525 vctxt->xpathStates = NULL;
27536 if (vctxt->elemInfos != NULL) {
27542 if (ei == NULL)
27566 if (ctxt == NULL)
27568 if (ctxt->value != NULL)
27570 if (ctxt->pctxt != NULL)
27572 if (ctxt->idcNodes != NULL) {
27583 if (ctxt->idcKeys != NULL) {
27590 if (ctxt->xpathStates != NULL) {
27592 ctxt->xpathStates = NULL;
27594 if (ctxt->xpathStatePool != NULL) {
27596 ctxt->xpathStatePool = NULL;
27602 if (ctxt->aidcs != NULL) {
27608 } while (cur != NULL);
27610 if (ctxt->attrInfos != NULL) {
27623 if (ctxt->elemInfos != NULL) {
27629 if (ei == NULL)
27636 if (ctxt->nodeQNames != NULL)
27638 if (ctxt->dict != NULL)
27655 if (ctxt == NULL)
27674 if (ctxt == NULL)
27679 if (ctxt->pctxt != NULL)
27695 if (ctxt == NULL)
27698 ctxt->error = NULL;
27699 ctxt->warning = NULL;
27701 if (ctxt->pctxt != NULL)
27721 if (ctxt == NULL)
27723 if (err != NULL)
27725 if (warn != NULL)
27727 if (ctx != NULL)
27750 if (ctxt == NULL)
27778 if (ctxt == NULL)
27789 xmlSchemaNodeInfoPtr ielem = NULL;
27795 if (valRoot == NULL) {
27797 VERROR(1, NULL, "The document has no document element");
27803 while (node != NULL) {
27818 if (node->ns != NULL)
27827 if (node->properties != NULL) {
27830 if (attr->ns != NULL)
27833 nsName = NULL;
27875 if ((ielem != NULL) && (ielem->flags & XML_SCHEMA_ELEM_INFO_EMPTY))
27878 -1, XML_SCHEMA_PUSH_TEXT_PERSIST, NULL);
27908 if (node->children != NULL) {
27934 if (node->next != NULL)
27967 if (vctxt->schema == NULL) {
27977 if ((vctxt->pctxt == NULL) &&
27986 if (vctxt->schema == NULL)
27992 if (pctxt->constructor == NULL)
28012 if (vctxt->schema != NULL) {
28014 vctxt->schema = NULL;
28028 if (vctxt->doc != NULL) {
28034 } else if (vctxt->reader != NULL) {
28042 } else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) {
28072 if ((ctxt == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE))
28075 if (ctxt->schema == NULL)
28097 if ((ctxt == NULL) || (doc == NULL))
28102 if (ctxt->node == NULL) {
28105 (xmlNodePtr) doc, NULL,
28106 "The document has no document element", NULL, NULL);
28151 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28152 (ctxt->user_sax->internalSubset != NULL))
28161 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28162 (ctxt->user_sax->isStandalone != NULL))
28171 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28172 (ctxt->user_sax->hasInternalSubset != NULL))
28181 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28182 (ctxt->user_sax->hasExternalSubset != NULL))
28192 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28193 (ctxt->user_sax->externalSubset != NULL))
28202 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28203 (ctxt->user_sax->resolveEntity != NULL))
28206 return(NULL);
28213 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28214 (ctxt->user_sax->getEntity != NULL))
28216 return(NULL);
28223 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28224 (ctxt->user_sax->getParameterEntity != NULL))
28226 return(NULL);
28235 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28236 (ctxt->user_sax->entityDecl != NULL))
28247 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28248 (ctxt->user_sax->attributeDecl != NULL)) {
28261 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28262 (ctxt->user_sax->elementDecl != NULL))
28271 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28272 (ctxt->user_sax->notationDecl != NULL))
28283 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28284 (ctxt->user_sax->unparsedEntityDecl != NULL))
28293 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28294 (ctxt->user_sax->setDocumentLocator != NULL))
28302 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28303 (ctxt->user_sax->startDocument != NULL))
28311 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28312 (ctxt->user_sax->endDocument != NULL))
28321 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28322 (ctxt->user_sax->processingInstruction != NULL))
28330 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28331 (ctxt->user_sax->comment != NULL))
28342 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28343 (ctxt->user_sax->warning != NULL)) {
28350 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28351 (ctxt->user_sax->error != NULL)) {
28358 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28359 (ctxt->user_sax->fatalError != NULL)) {
28372 if (ctxt == NULL)
28374 if ((ctxt->user_sax != NULL) && (ctxt->user_sax->characters != NULL))
28376 if (ctxt->ctxt != NULL)
28384 if (ctxt == NULL)
28386 if ((ctxt->user_sax != NULL) &&
28387 (ctxt->user_sax->ignorableWhitespace != NULL))
28389 if (ctxt->ctxt != NULL)
28397 if (ctxt == NULL)
28399 if ((ctxt->user_sax != NULL) &&
28400 (ctxt->user_sax->cdataBlock != NULL))
28402 if (ctxt->ctxt != NULL)
28410 if (ctxt == NULL)
28412 if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
28413 (ctxt->user_sax->reference != NULL))
28415 if (ctxt->ctxt != NULL)
28426 if (ctxt == NULL)
28428 if ((ctxt->user_sax != NULL) &&
28429 (ctxt->user_sax->startElementNs != NULL))
28434 if (ctxt->ctxt != NULL)
28445 if (ctxt == NULL)
28447 if ((ctxt->user_sax != NULL) &&
28448 (ctxt->user_sax->endElementNs != NULL))
28450 if (ctxt->ctxt != NULL)
28465 * or NULL in case of errors.
28474 if ((ctxt == NULL) || (sax == NULL) || (user_data == NULL))
28475 return(NULL);
28481 if ((old_sax != NULL) && (old_sax->initialized != XML_SAX2_MAGIC))
28482 return(NULL);
28483 if ((old_sax != NULL) &&
28484 (old_sax->startElementNs == NULL) && (old_sax->endElementNs == NULL) &&
28485 ((old_sax->startElement != NULL) || (old_sax->endElement != NULL)))
28486 return(NULL);
28492 if (ret == NULL) {
28493 return(NULL);
28501 if (old_sax == NULL) {
28522 * routine only if non NULL in the user block, this can speed up
28525 if (old_sax->internalSubset != NULL)
28527 if (old_sax->isStandalone != NULL)
28529 if (old_sax->hasInternalSubset != NULL)
28531 if (old_sax->hasExternalSubset != NULL)
28533 if (old_sax->resolveEntity != NULL)
28535 if (old_sax->getEntity != NULL)
28537 if (old_sax->entityDecl != NULL)
28539 if (old_sax->notationDecl != NULL)
28541 if (old_sax->attributeDecl != NULL)
28543 if (old_sax->elementDecl != NULL)
28545 if (old_sax->unparsedEntityDecl != NULL)
28547 if (old_sax->setDocumentLocator != NULL)
28549 if (old_sax->startDocument != NULL)
28551 if (old_sax->endDocument != NULL)
28553 if (old_sax->processingInstruction != NULL)
28555 if (old_sax->comment != NULL)
28557 if (old_sax->warning != NULL)
28559 if (old_sax->error != NULL)
28561 if (old_sax->fatalError != NULL)
28563 if (old_sax->getParameterEntity != NULL)
28565 if (old_sax->externalSubset != NULL)
28575 if ((old_sax->ignorableWhitespace != NULL) &&
28615 if ((plug == NULL) || (plug->magic != XML_SAX_PLUG_MAGIC))
28623 if (plug->user_sax != NULL) {
28653 xmlSchemaSAXPlugPtr plug = NULL;
28654 xmlSAXHandlerPtr old_sax = NULL;
28655 xmlParserCtxtPtr pctxt = NULL;
28656 xmlParserInputPtr inputStream = NULL;
28659 if ((ctxt == NULL) || (input == NULL))
28666 if (pctxt == NULL)
28678 if (inputStream == NULL) {
28690 if (plug == NULL) {
28707 ctxt->parserCtxt = NULL;
28708 ctxt->sax = NULL;
28709 ctxt->input = NULL;
28710 if (plug != NULL) {
28714 if (pctxt != NULL) {
28741 if ((ctxt == NULL) || (filename == NULL))
28746 if (input == NULL)
28749 NULL, NULL);
28759 * Returns the parser context of the schema validation context or NULL
28765 if (ctxt == NULL)
28766 return(NULL);