Lines Matching defs:pctxt

992     xmlSchemaParserCtxtPtr pctxt;
1095 xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
2088 xmlSchemaParserCtxtPtr pctxt = (xmlSchemaParserCtxtPtr) ctxt;
2090 pctxt->nberrors++;
2091 pctxt->err = error;
2092 channel = pctxt->error;
2094 channel = pctxt->warning;
2096 schannel = pctxt->serror;
2097 data = pctxt->errCtxt;
2282 xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt,
2288 xmlSchemaInternalErr2(ACTXT_CAST pctxt, funcName, message,
2735 #define PERROR_INT(func, msg) xmlSchemaInternalErr(ACTXT_CAST pctxt, func, msg);
3526 xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt,
3533 if (WXS_CONSTRUCTOR(pctxt)->mainSchema == NULL) {
3538 mainSchema = WXS_CONSTRUCTOR(pctxt)->mainSchema;
3569 if (! WXS_HAS_BUCKETS(pctxt)) {
3579 WXS_CONSTRUCTOR(pctxt)->mainBucket = ret;
3596 WXS_IMPBUCKET(ret)->schema = xmlSchemaNewSchema(pctxt);
3613 WXS_CONSTRUCTOR(pctxt)->dict);
3633 if (WXS_IS_BUCKET_IMPMAIN(WXS_CONSTRUCTOR(pctxt)->bucket->type))
3635 WXS_IMPBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket);
3638 WXS_INCBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket)->ownerImport;
3654 if (xmlSchemaItemListAdd(WXS_CONSTRUCTOR(pctxt)->buckets, ret) == -1)
5184 xmlSchemaAddAttributeUse(xmlSchemaParserCtxtPtr pctxt,
5189 if (pctxt == NULL)
5194 xmlSchemaPErrMemory(pctxt, "allocating attribute", NULL);
5201 WXS_ADD_LOCAL(pctxt, ret);
5212 xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt,
5223 xmlSchemaPErrMemory(pctxt,
5232 if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL)
5233 WXS_CONSTRUCTOR(pctxt)->redefs = ret;
5235 WXS_CONSTRUCTOR(pctxt)->lastRedef->next = ret;
5236 WXS_CONSTRUCTOR(pctxt)->lastRedef = ret;
5254 xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
5262 if ((pctxt == NULL) || (name == NULL))
5268 xmlSchemaPErrMemory(pctxt, "allocating attribute group", NULL);
5279 if (pctxt->isRedefine) {
5280 pctxt->redef = xmlSchemaAddRedef(pctxt, pctxt->redefined,
5282 if (pctxt->redef == NULL) {
5286 pctxt->redefCounter = 0;
5288 WXS_ADD_GLOBAL(pctxt, ret);
5289 WXS_ADD_PENDING(pctxt, ret);
5385 xmlSchemaNewQNameRef(xmlSchemaParserCtxtPtr pctxt,
5395 xmlSchemaPErrMemory(pctxt,
5408 WXS_ADD_LOCAL(pctxt, ret);
5413 xmlSchemaAddAttributeUseProhib(xmlSchemaParserCtxtPtr pctxt)
5420 xmlSchemaPErrMemory(pctxt,
5426 WXS_ADD_LOCAL(pctxt, ret);
5669 xmlSchemaSubstGroupAdd(xmlSchemaParserCtxtPtr pctxt,
5675 if (WXS_SUBST_GROUPS(pctxt) == NULL) {
5676 WXS_SUBST_GROUPS(pctxt) = xmlHashCreateDict(10, pctxt->dict);
5677 if (WXS_SUBST_GROUPS(pctxt) == NULL)
5696 if (xmlHashAddEntry2(WXS_SUBST_GROUPS(pctxt),
5707 xmlSchemaSubstGroupGet(xmlSchemaParserCtxtPtr pctxt,
5710 if (WXS_SUBST_GROUPS(pctxt) == NULL)
5712 return(xmlHashLookup2(WXS_SUBST_GROUPS(pctxt),
5719 * @pctxt: a schema parser context
5728 xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
5734 if ((pctxt == NULL) || (head == NULL) || (member == NULL))
5737 substGroup = xmlSchemaSubstGroupGet(pctxt, head);
5739 substGroup = xmlSchemaSubstGroupAdd(pctxt, head);
6215 xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt,
6245 xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt,
6258 if ((pctxt == NULL) || (type == NULL) || (attr == NULL))
6293 xmlSchemaPSimpleTypeErr(pctxt,
6392 xmlSchemaCheckReference(xmlSchemaParserCtxtPtr pctxt,
6399 if (xmlStrEqual(pctxt->targetNamespace, namespaceName))
6406 if (WXS_BUCKET(pctxt)->relations != NULL) {
6409 rel = WXS_BUCKET(pctxt)->relations;
6424 xmlSchemaCustomErr(ACTXT_CAST pctxt,
6430 xmlSchemaCustomErr(ACTXT_CAST pctxt,
7083 xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt,
7104 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7108 if (xmlSchemaPValAttrNodeQName(pctxt, schema,
7112 if (xmlSchemaCheckReference(pctxt, schema, node, attr, tmpNs) != 0)
7116 nberrors = pctxt->nberrors;
7125 xmlSchemaPValAttrNodeID(pctxt, attr);
7134 xmlSchemaPValAttrNodeID(pctxt, attr);
7137 xmlSchemaPValAttrNodeQName(pctxt, schema, NULL,
7145 attrValue = xmlSchemaGetNodeContent(pctxt,
7148 ns = pctxt->targetNamespace;
7151 xmlSchemaPSimpleTypeErr(pctxt,
7162 attrValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
7171 xmlSchemaPSimpleTypeErr(pctxt,
7184 xmlSchemaPMutualExclAttrErr(pctxt,
7188 defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
7198 xmlSchemaPMutualExclAttrErr(pctxt,
7202 defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
7210 xmlSchemaPIllegalAttrErr(pctxt,
7223 xmlSchemaPSimpleTypeErr(pctxt,
7234 if (nberrors != pctxt->nberrors)
7241 ns = pctxt->targetNamespace;
7247 xmlSchemaCustomErr(ACTXT_CAST pctxt,
7255 xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
7259 if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
7268 xmlSchemaPSimpleTypeErr(pctxt,
7281 use = xmlSchemaAddAttributeUse(pctxt, node);
7288 attrDecl = xmlSchemaAddAttribute(pctxt, schema, name, ns, node, 0);
7310 use = xmlSchemaAddAttributeUse(pctxt, node);
7316 WXS_ADD_PENDING(pctxt, use);
7321 ref = xmlSchemaNewQNameRef(pctxt, XML_SCHEMA_TYPE_ATTRIBUTE,
7348 xmlSchemaParseAnnotation(pctxt, child, 0);
7352 xmlSchemaPContentErr(pctxt,
7361 xmlSchemaCustomWarning(ACTXT_CAST pctxt,
7369 xmlSchemaCustomWarning(ACTXT_CAST pctxt,
7395 xmlSchemaCustomWarning(ACTXT_CAST pctxt,
7409 prohib = xmlSchemaAddAttributeUseProhib(pctxt);
7419 WXS_ADD_PENDING(pctxt, prohib);
7427 use->annot = xmlSchemaParseAnnotation(pctxt, child, 1);
7438 xmlSchemaPContentErr(pctxt,
7443 xmlSchemaPContentErr(pctxt,
7455 xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
7461 xmlSchemaParseSimpleType(pctxt, schema, child, 0);
7465 xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
7475 xmlSchemaParseGlobalAttribute(xmlSchemaParserCtxtPtr pctxt,
7490 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7498 xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
7502 if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
7511 xmlSchemaPSimpleTypeErr(pctxt,
7525 if (xmlStrEqual(pctxt->targetNamespace, xmlSchemaInstanceNs)) {
7526 xmlSchemaCustomErr(ACTXT_CAST pctxt,
7532 ret = xmlSchemaAddAttribute(pctxt, schema, attrValue,
7533 pctxt->targetNamespace, node, 1);
7550 xmlSchemaPIllegalAttrErr(pctxt,
7554 xmlSchemaPIllegalAttrErr(pctxt,
7559 xmlSchemaPValAttrQName(pctxt, schema, NULL,
7562 xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
7566 ret->defValue = xmlSchemaGetProp(pctxt, node, "fixed");
7579 xmlSchemaPMutualExclAttrErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1,
7582 ret->defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
7589 ret->annot = xmlSchemaParseAnnotation(pctxt, child, 1);
7598 xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
7603 ret->subtypes = xmlSchemaParseSimpleType(pctxt, schema, child, 0);
7607 xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
7628 xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
7637 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7642 xmlSchemaPMissingAttrErr(pctxt,
7647 xmlSchemaPValAttrNodeQName(pctxt, schema,
7649 if (xmlSchemaCheckReference(pctxt, schema, node, attr, refNs) != 0)
7661 xmlSchemaPIllegalAttrErr(pctxt,
7665 xmlSchemaPIllegalAttrErr(pctxt,
7671 xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
7681 xmlSchemaParseAnnotation(pctxt, child, 0);
7685 xmlSchemaPContentErr(pctxt,
7694 if (pctxt->isRedefine && pctxt->redef &&
7695 (pctxt->redef->item->type ==
7697 (ref == pctxt->redef->refName) &&
7698 (refNs == pctxt->redef->refTargetNs))
7707 if (pctxt->redefCounter != 0) {
7710 xmlSchemaCustomErr(ACTXT_CAST pctxt,
7719 pctxt->redefCounter++;
7724 ret = xmlSchemaNewQNameRef(pctxt,
7729 pctxt->redef->reference = WXS_BASIC_CAST ret;
7736 ret = xmlSchemaNewQNameRef(pctxt,
7742 WXS_ADD_PENDING(pctxt, ret);
7749 * @pctxt: a schema validation context
7759 xmlSchemaParseAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
7769 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
7774 xmlSchemaPMissingAttrErr(pctxt,
7782 if (xmlSchemaPValAttrNode(pctxt,
7787 ret = xmlSchemaAddAttributeGroupDefinition(pctxt, schema,
7788 name, pctxt->targetNamespace, node);
7800 xmlSchemaPIllegalAttrErr(pctxt,
7804 xmlSchemaPIllegalAttrErr(pctxt,
7810 xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
7816 ret->annot = xmlSchemaParseAnnotation(pctxt, child, 1);
7822 if (xmlSchemaParseLocalAttributes(pctxt, schema, &child,
7832 ret->attributeWildcard = xmlSchemaParseAnyAttribute(pctxt,
7837 xmlSchemaPContentErr(pctxt,
9971 if (vctxt->pctxt == NULL) {
9973 vctxt->pctxt =
9976 vctxt->pctxt = xmlSchemaNewParserCtxt("*");
9977 if (vctxt->pctxt == NULL) {
9983 xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error,
9985 xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror,
9993 * @pctxt: the schema parser context
10002 xmlSchemaGetSchemaBucket(xmlSchemaParserCtxtPtr pctxt,
10008 list = pctxt->constructor->buckets;
10024 xmlSchemaGetChameleonSchemaBucket(xmlSchemaParserCtxtPtr pctxt,
10031 list = pctxt->constructor->buckets;
10053 xmlSchemaGetSchemaBucketByTNS(xmlSchemaParserCtxtPtr pctxt,
10060 list = pctxt->constructor->buckets;
10078 xmlSchemaParseNewDocWithContext(xmlSchemaParserCtxtPtr pctxt,
10086 xmlSchemaBucketPtr oldbucket = pctxt->constructor->bucket;
10099 pctxt->schema = schema;
10104 pctxt->targetNamespace = bucket->targetNamespace;
10105 WXS_CONSTRUCTOR(pctxt)->bucket = bucket;
10112 pctxt->isS4S = 1;
10118 ret = xmlSchemaParseSchemaElement(pctxt, schema, node);
10124 oldErrs = pctxt->nberrors;
10125 ret = xmlSchemaParseSchemaTopLevel(pctxt, schema, node->children);
10130 * as a result of the obove functions; so better rely on pctxt->err
10133 if ((ret == 0) && (oldErrs != pctxt->nberrors)) {
10134 ret = pctxt->err;
10139 WXS_CONSTRUCTOR(pctxt)->bucket = oldbucket;
10147 xmlSchemaParseNewDoc(xmlSchemaParserCtxtPtr pctxt,
10166 if (pctxt->constructor == NULL) {
10173 (const char *) bucket->schemaLocation, pctxt->dict);
10176 newpctxt->constructor = pctxt->constructor;
10183 xmlSchemaSetParserErrors(newpctxt, pctxt->error, pctxt->warning,
10184 pctxt->errCtxt);
10185 xmlSchemaSetParserStructuredErrors(newpctxt, pctxt->serror,
10186 pctxt->errCtxt);
10187 newpctxt->counter = pctxt->counter;
10194 pctxt->err = res;
10195 pctxt->nberrors += newpctxt->nberrors;
10196 pctxt->counter = newpctxt->counter;
10254 * @pctxt: a schema validation context
10265 xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt,
10303 if ((type == XML_SCHEMA_SCHEMA_MAIN) || (! WXS_HAS_BUCKETS(pctxt)))
10308 bkt = xmlSchemaGetSchemaBucket(pctxt, schemaLocation);
10310 (pctxt->constructor->bucket == bkt)) {
10313 xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
10326 xmlSchemaSchemaRelationAddChild(pctxt->constructor->bucket,
10353 xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
10363 xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
10397 bkt = xmlSchemaGetSchemaBucketByTNS(pctxt,
10416 xmlSchemaCustomWarning(ACTXT_CAST pctxt,
10456 chamel = xmlSchemaGetChameleonSchemaBucket(pctxt,
10494 schemaLocation = xmlDictLookup(pctxt->dict,
10507 if ((pctxt->dict != NULL) && (parserCtxt->dict != NULL)) {
10513 parserCtxt->dict = pctxt->dict;
10557 xmlSchemaCustomErr(ACTXT_CAST pctxt, res,
10567 xmlSchemaPErr(pctxt, NULL,
10583 xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_NOROOT,
10592 xmlSchemaCleanupDoc(pctxt, docElem);
10597 xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_NOT_SCHEMA,
10607 targetNamespace = xmlSchemaGetProp(pctxt, docElem,
10614 bkt = xmlSchemaBucketCreate(pctxt, type,
10653 return(pctxt->err);
10677 xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
10687 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
10699 xmlSchemaPIllegalAttrErr(pctxt,
10703 xmlSchemaPIllegalAttrErr(pctxt,
10711 if (xmlSchemaPValAttr(pctxt, NULL, node,
10714 xmlSchemaPSimpleTypeErr(pctxt,
10719 return (pctxt->err);
10722 if (xmlSchemaPValAttr(pctxt, NULL, node,
10725 xmlSchemaPSimpleTypeErr(pctxt,
10730 return (pctxt->err);
10744 xmlSchemaPContentErr(pctxt,
10757 thisTargetNamespace = WXS_BUCKET(pctxt)->origTargetNamespace;
10765 xmlSchemaPCustomErr(pctxt,
10771 return (pctxt->err);
10779 xmlSchemaPCustomErr(pctxt,
10785 return (pctxt->err);
10792 schemaLocation = xmlSchemaBuildAbsoluteURI(pctxt->dict,
10794 ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT,
10809 xmlSchemaCustomWarning(ACTXT_CAST pctxt,
10817 ret = xmlSchemaParseNewDoc(pctxt, schema, bucket);
10824 xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt,
10832 if ((pctxt == NULL) || (schema == NULL) || (node == NULL) ||
10846 xmlSchemaPIllegalAttrErr(pctxt,
10850 xmlSchemaPIllegalAttrErr(pctxt,
10855 xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
10868 if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
10884 (*schemaLocation) = (xmlChar *) xmlDictLookup(pctxt->dict, uri, -1);
10887 xmlSchemaPMissingAttrErr(pctxt,
10895 if (xmlStrEqual(*schemaLocation, pctxt->URL)) {
10897 xmlSchemaPCustomErr(pctxt,
10903 xmlSchemaPCustomErr(pctxt,
10914 return(pctxt->err);
10920 xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt,
10931 if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
10938 res = xmlSchemaParseIncludeOrRedefineAttrs(pctxt, schema,
10945 res = xmlSchemaAddSchemaDoc(pctxt, type, schemaLocation, NULL,
10946 NULL, 0, node, pctxt->targetNamespace, NULL, &bucket);
10968 xmlSchemaCustomErr(ACTXT_CAST pctxt, res,
10985 xmlSchemaCustomErr(ACTXT_CAST pctxt, res,
11003 if (pctxt->targetNamespace == NULL) {
11004 xmlSchemaCustomErr(ACTXT_CAST pctxt,
11013 pctxt->targetNamespace)) {
11015 xmlSchemaPCustomErrExt(pctxt,
11022 pctxt->targetNamespace);
11025 } else if (pctxt->targetNamespace != NULL) {
11032 (bucket->targetNamespace != pctxt->targetNamespace)) {
11041 bucket->targetNamespace = pctxt->targetNamespace;
11055 xmlSchemaParseNewDoc(pctxt, schema, bucket);
11068 pctxt->redefined = bucket;
11072 pctxt->isRedefine = 1;
11083 xmlSchemaParseSimpleType(pctxt, schema, child, 1);
11085 xmlSchemaParseComplexType(pctxt, schema, child, 1);
11089 xmlSchemaParseModelGroupDefinition(pctxt,
11093 xmlSchemaParseAttributeGroupDefinition(pctxt, schema,
11098 pctxt->redefined = NULL;
11099 pctxt->isRedefine = 0;
11111 xmlSchemaPContentErr(pctxt, res,
11115 xmlSchemaPContentErr(pctxt, res,
11123 return(pctxt->err);
11127 xmlSchemaParseRedefine(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
11135 res = xmlSchemaParseIncludeOrRedefine(pctxt, schema, node,
11143 xmlSchemaParseInclude(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
11148 res = xmlSchemaParseIncludeOrRedefine(pctxt, schema, node,
12518 xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt,
12530 start = pctxt->state;
12532 end = xmlAutomataNewState(pctxt->am);
12533 substGroup = xmlSchemaSubstGroupGet(pctxt, elemDecl);
12535 xmlSchemaPErr(pctxt, WXS_ITEM_NODE(particle),
12549 tmp = xmlAutomataNewCountedTrans(pctxt->am, start, NULL, counter);
12550 xmlAutomataNewTransition2(pctxt->am, tmp, end,
12557 xmlAutomataNewTransition2(pctxt->am, tmp, end,
12564 xmlAutomataNewEpsilon(pctxt->am,
12565 xmlAutomataNewTransition2(pctxt->am,
12582 * tmp = xmlAutomataNewOnceTrans2(pctxt->am, start, NULL,
12586 tmp = xmlAutomataNewTransition2(pctxt->am, start, NULL,
12588 xmlAutomataNewEpsilon(pctxt->am, tmp, end);
12597 xmlAutomataNewCounter(pctxt->am, minOccurs,
12599 hop = xmlAutomataNewState(pctxt->am);
12601 xmlAutomataNewEpsilon(pctxt->am,
12602 xmlAutomataNewTransition2(pctxt->am,
12611 xmlAutomataNewEpsilon(pctxt->am,
12612 xmlAutomataNewTransition2(pctxt->am,
12617 xmlAutomataNewCountedTrans(pctxt->am, hop, start, counter);
12618 xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter);
12621 xmlAutomataNewEpsilon(pctxt->am, start, end);
12622 pctxt->state = end;
12685 xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
12708 start = pctxt->state;
12709 end = xmlAutomataNewState(pctxt->am);
12718 pctxt->state =
12719 xmlAutomataNewTransition2(pctxt->am,
12721 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
12725 pctxt->state =
12726 xmlAutomataNewTransition2(pctxt->am,
12728 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
12733 pctxt->state = start;
12734 pctxt->state = xmlAutomataNewTransition2(pctxt->am,
12735 pctxt->state, NULL, BAD_CAST "*", ns->value, wild);
12736 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
12741 pctxt->state = xmlAutomataNewNegTrans(pctxt->am,
12753 counter = xmlAutomataNewCounter(pctxt->am, minOccurs, maxOccurs);
12754 hop = xmlAutomataNewState(pctxt->am);
12756 pctxt->state =
12757 xmlAutomataNewTransition2(pctxt->am,
12759 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
12760 pctxt->state =
12761 xmlAutomataNewTransition2(pctxt->am,
12763 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
12767 pctxt->state =
12768 xmlAutomataNewTransition2(pctxt->am,
12770 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
12775 pctxt->state = xmlAutomataNewNegTrans(pctxt->am,
12779 xmlAutomataNewCountedTrans(pctxt->am, hop, start, counter);
12780 xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter);
12783 xmlAutomataNewEpsilon(pctxt->am, start, end);
12785 pctxt->state = end;
12789 xmlSchemaBuildContentModelForElement(pctxt, particle);
12801 xmlSchemaBuildAContentModel(pctxt,
12806 xmlAutomataStatePtr oldstate = pctxt->state;
12813 pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
12815 oldstate = pctxt->state;
12817 counter = xmlAutomataNewCounter(pctxt->am,
12822 xmlSchemaBuildAContentModel(pctxt,
12826 tmp = pctxt->state;
12827 xmlAutomataNewCountedTrans(pctxt->am, tmp,
12829 pctxt->state =
12830 xmlAutomataNewCounterTrans(pctxt->am, tmp,
12834 pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
12836 oldstate = pctxt->state;
12840 xmlSchemaBuildAContentModel(pctxt,
12844 xmlAutomataNewEpsilon(pctxt->am, pctxt->state,
12851 pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
12852 pctxt->state, NULL);
12854 xmlAutomataNewEpsilon(pctxt->am,
12855 oldstate, pctxt->state);
12863 pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
12865 oldstate = pctxt->state;
12867 counter = xmlAutomataNewCounter(pctxt->am,
12873 xmlSchemaBuildAContentModel(pctxt,
12877 tmp = pctxt->state;
12878 xmlAutomataNewCountedTrans(pctxt->am,
12880 pctxt->state =
12881 xmlAutomataNewCounterTrans(pctxt->am, tmp, NULL,
12884 xmlAutomataNewEpsilon(pctxt->am,
12885 oldstate, pctxt->state);
12890 xmlSchemaBuildAContentModel(pctxt,
12895 xmlAutomataNewEpsilon(pctxt->am, oldstate,
12896 pctxt->state);
12906 start = pctxt->state;
12907 end = xmlAutomataNewState(pctxt->am);
12916 pctxt->state = start;
12917 xmlSchemaBuildAContentModel(pctxt,
12919 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
12935 xmlAutomataNewCounter(pctxt->am, minOccurs, maxOccurs);
12936 hop = xmlAutomataNewState(pctxt->am);
12937 base = xmlAutomataNewState(pctxt->am);
12941 pctxt->state = base;
12942 xmlSchemaBuildAContentModel(pctxt,
12944 xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
12947 xmlAutomataNewEpsilon(pctxt->am, start, base);
12948 xmlAutomataNewCountedTrans(pctxt->am, hop, base, counter);
12949 xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter);
12952 xmlAutomataNewEpsilon(pctxt->am, start, end);
12954 pctxt->state = end;
12966 start = pctxt->state;
12968 pctxt->state = start;
12990 counter = xmlAutomataNewCounter(pctxt->am,
12992 xmlSchemaBuildContentModelForSubstGroup(pctxt,
12993 sub, counter, pctxt->state);
12997 xmlAutomataNewOnceTrans2(pctxt->am, pctxt->state,
12998 pctxt->state,
13005 xmlAutomataNewCountTrans2(pctxt->am, pctxt->state,
13006 pctxt->state,
13017 pctxt->state =
13018 xmlAutomataNewAllTrans(pctxt->am, pctxt->state, NULL, lax);
13031 xmlSchemaInternalErr2(ACTXT_CAST pctxt,
14014 xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt,
14058 xmlSchemaPAttrUseErr4(pctxt,
14068 /* err = pctxt->err; */
14069 } else if (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt,
14081 xmlSchemaPAttrUseErr4(pctxt,
14098 /* err = pctxt->err; */
14132 xmlSchemaPAttrUseErr4(pctxt,
14143 /* err = pctxt->err; */
14165 xmlSchemaPAttrUseErr4(pctxt,
14174 /* err = pctxt->err; */
14208 xmlSchemaCustomErr4(ACTXT_CAST pctxt,
14236 xmlSchemaCustomErr4(ACTXT_CAST pctxt,
14246 return(pctxt->err);
14257 xmlSchemaCustomErr4(ACTXT_CAST pctxt,
14267 return(pctxt->err);
14279 xmlSchemaCustomErr4(ACTXT_CAST pctxt,
14289 return(pctxt->err);
14297 xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
14317 xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt,
14331 if (xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt) == -1)
14345 * into pctxt->attrProhibs.
14347 if (xmlSchemaExpandAttributeGroupRefs(pctxt,
14349 pctxt->attrProhibs) == -1)
14354 if (pctxt->attrProhibs->nbItems != 0)
14355 prohibs = pctxt->attrProhibs;
14357 if (xmlSchemaExpandAttributeGroupRefs(pctxt,
14470 if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard,
14793 * @pctxt: the schema parser context
14804 xmlSchemaCheckTypeDefCircularInternal(xmlSchemaParserCtxtPtr pctxt,
14814 xmlSchemaPCustomErr(pctxt,
14827 ret = xmlSchemaCheckTypeDefCircularInternal(pctxt, ctxtType,
14867 xmlSchemaCheckUnionTypeDefCircularRecur(xmlSchemaParserCtxtPtr pctxt,
14880 xmlSchemaPCustomErr(pctxt,
14891 res = xmlSchemaCheckUnionTypeDefCircularRecur(pctxt,
14906 xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt,
14911 return(xmlSchemaCheckUnionTypeDefCircularRecur(pctxt, type,
15157 xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
15175 xmlSchemaPCustomErr(pctxt,
15189 xmlSchemaPCustomErr(pctxt,
15217 xmlSchemaPIllegalFacetAtomicErr(pctxt,
15245 xmlSchemaTypeFixup(itemType, ACTXT_CAST pctxt);
15253 xmlSchemaPCustomErr(pctxt,
15266 xmlSchemaPCustomErr(pctxt,
15291 xmlSchemaPCustomErr(pctxt,
15309 xmlSchemaPIllegalFacetListUnionErr(pctxt,
15334 xmlSchemaPCustomErr(pctxt,
15348 xmlSchemaPCustomErr(pctxt,
15371 (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, itemType,
15374 xmlSchemaPCustomErrExt(pctxt,
15412 xmlSchemaPIllegalFacetListUnionErr(pctxt,
15444 xmlSchemaTypeFixup(member->type, ACTXT_CAST pctxt);
15448 xmlSchemaPCustomErr(pctxt,
15471 xmlSchemaPCustomErr(pctxt,
15485 xmlSchemaPCustomErr(pctxt,
15497 xmlSchemaPCustomErr(pctxt,
15510 xmlSchemaPCustomErr(pctxt,
15551 (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt,
15555 xmlSchemaPCustomErrExt(pctxt,
15586 xmlSchemaPIllegalFacetListUnionErr(pctxt,
15690 * @pctxt: the schema parser context
15705 xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt,
15732 xmlSchemaPCustomErr(pctxt,
15753 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
15756 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
15783 xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
15801 xmlSchemaCustomErr(ACTXT_CAST pctxt,
15847 xmlSchemaCustomErr(ACTXT_CAST pctxt,
15876 xmlSchemaCustomErr(ACTXT_CAST pctxt,
16132 xmlSchemaCustomErr(ACTXT_CAST pctxt,
16145 xmlSchemaCustomErr(ACTXT_CAST pctxt,
17052 xmlSchemaPCustomErrExt(pctxt, \
17061 xmlSchemaPCustomErr(pctxt, \
17067 xmlSchemaPCustomErr(pctxt, \
17074 xmlSchemaDeriveFacetErr(xmlSchemaParserCtxtPtr pctxt,
17102 xmlSchemaPCustomErr(pctxt,
17118 xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt,
17249 xmlSchemaDeriveFacetErr(pctxt, flength, bflength, 0, 0, 1);
17264 xmlSchemaDeriveFacetErr(pctxt, fminlen, bfminlen, 1, 1, 1);
17278 xmlSchemaDeriveFacetErr(pctxt, fmaxlen, bfmaxlen, -1, 1, 1);
17297 xmlSchemaDeriveFacetErr(pctxt, flength, fminlen, 1, 1, 0);
17307 xmlSchemaDeriveFacetErr(pctxt, flength, fmaxlen, -1, 1, 0);
17320 xmlSchemaDeriveFacetErr(pctxt, fmaxinc, fmininc, 1, 1, 0);
17332 xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfmaxinc, -1, 1, 1);
17343 xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfmaxexc, -1, 0, 1);
17352 xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfmininc, 1, 1, 1);
17361 xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfminexc, 1, 0, 1);
17374 xmlSchemaDeriveFacetErr(pctxt, fmaxexc, fminexc, 1, 1, 0);
17386 xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfmaxexc, -1, 1, 1);
17398 xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfmaxinc, -1, 1, 1);
17407 xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfmininc, 1, 0, 1);
17416 xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfminexc, 1, 0, 1);
17429 xmlSchemaDeriveFacetErr(pctxt, fminexc, fmaxinc, -1, 0, 0);
17441 xmlSchemaDeriveFacetErr(pctxt, fminexc, bfminexc, 1, 1, 1);
17453 xmlSchemaDeriveFacetErr(pctxt, fminexc, bfmaxinc, -1, 1, 1);
17462 xmlSchemaDeriveFacetErr(pctxt, fminexc, bfmininc, 1, 1, 1);
17471 xmlSchemaDeriveFacetErr(pctxt, fminexc, bfmaxexc, -1, 0, 1);
17484 xmlSchemaDeriveFacetErr(pctxt, fmininc, fmaxexc, -1, 0, 0);
17496 xmlSchemaDeriveFacetErr(pctxt, fmininc, bfmininc, 1, 1, 1);
17508 xmlSchemaDeriveFacetErr(pctxt, fmininc, bfmaxinc, -1, 1, 1);
17517 xmlSchemaDeriveFacetErr(pctxt, fmininc, bfminexc, 1, 0, 1);
17525 xmlSchemaDeriveFacetErr(pctxt, fmininc, bfmaxexc, -1, 0, 1);
17537 xmlSchemaDeriveFacetErr(pctxt, ftotdig, bftotdig,
17552 xmlSchemaDeriveFacetErr(pctxt, ffracdig, bffracdig,
17570 xmlSchemaDeriveFacetErr(pctxt, ffracdig, ftotdig,
17634 xmlSchemaPErrMemory(pctxt,
17657 xmlSchemaFinishMemberTypeDefinitionsProperty(xmlSchemaParserCtxtPtr pctxt,
17674 xmlSchemaTypeFixup(link->type, ACTXT_CAST pctxt);
17688 xmlSchemaPErrMemory(pctxt, "allocating a type link",
17826 xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt,
17869 if (xmlSchemaFixupSimpleTypeStageOne(pctxt, type->baseType) == -1)
17898 xmlSchemaDebugFixedType(xmlSchemaParserCtxtPtr pctxt,
17953 xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt,
17956 int res, olderrs = pctxt->nberrors;
17973 xmlSchemaTypeFixup(type->baseType, ACTXT_CAST pctxt);
17981 (xmlSchemaFinishMemberTypeDefinitionsProperty(pctxt, type) == -1))
17993 res = xmlSchemaCheckSTPropsCorrect(pctxt, type);
17999 res = xmlSchemaCheckCOSSTRestricts(pctxt, type);
18016 res = xmlSchemaCheckFacetValues(type, pctxt);
18020 res = xmlSchemaDeriveAndValidateFacets(pctxt, type);
18032 xmlSchemaDebugFixedType(pctxt, type);
18034 if (olderrs != pctxt->nberrors)
18035 return(pctxt->err);
18040 xmlSchemaDebugFixedType(pctxt, type);
18046 xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
18049 int res = 0, olderrs = pctxt->nberrors;
18064 xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt);
18075 res = xmlSchemaCheckSRCCT(pctxt, type);
18124 snprintf(buf, 29, "#scST%d", ++(pctxt->counter));
18125 tmpname = xmlDictLookup(pctxt->dict, BAD_CAST buf, -1);
18126 content = xmlSchemaAddType(pctxt, pctxt->schema,
18130 content = xmlSchemaAddType(pctxt, pctxt->schema,
18153 xmlSchemaTypeFixup(contentBase, ACTXT_CAST pctxt);
18158 res = xmlSchemaFixupSimpleTypeStageOne(pctxt, content);
18160 res = xmlSchemaFixupSimpleTypeStageTwo(pctxt, content);
18176 xmlSchemaPCustomErr(pctxt,
18196 xmlSchemaPCustomErr(pctxt,
18216 xmlSchemaPCustomErr(pctxt,
18260 particle = xmlSchemaAddParticle(pctxt,
18268 xmlSchemaAddModelGroup(pctxt, pctxt->schema,
18347 xmlSchemaCustomErr(ACTXT_CAST pctxt,
18367 xmlSchemaCustomErr(ACTXT_CAST pctxt,
18385 particle = xmlSchemaAddParticle(pctxt,
18393 xmlSchemaAddModelGroup(pctxt, pctxt->schema,
18405 (xmlSchemaTreeItemPtr) xmlSchemaAddParticle(pctxt,
18453 res = xmlSchemaFixupTypeAttributeUses(pctxt, type);
18460 res = xmlSchemaCheckCTComponent(pctxt, type);
18464 xmlSchemaDebugFixedType(pctxt, type);
18466 if (olderrs != pctxt->nberrors)
18467 return(pctxt->err);
18474 xmlSchemaDebugFixedType(pctxt, type);
18476 return(pctxt->err);
18481 xmlSchemaDebugFixedType(pctxt, type);
18519 * @pctxt: the schema parser context or NULL
18530 xmlSchemaParserCtxtPtr pctxt,
18541 if (pctxt == NULL)
18590 pctxt = xmlSchemaNewParserCtxt("*");
18591 if (pctxt == NULL)
18602 ACTXT_CAST pctxt, facet->node, base,
18608 xmlSchemaCustomErr(ACTXT_CAST pctxt,
18622 xmlSchemaCustomErr(ACTXT_CAST pctxt,
18647 xmlSchemaCustomErr(ACTXT_CAST pctxt,
18683 xmlSchemaCustomErr4(ACTXT_CAST pctxt,
18708 xmlSchemaCustomErr(ACTXT_CAST pctxt,
18719 if ((! ctxtGiven) && (pctxt != NULL))
18720 xmlSchemaFreeParserCtxt(pctxt);
18723 if ((! ctxtGiven) && (pctxt != NULL))
18724 xmlSchemaFreeParserCtxt(pctxt);
18737 xmlSchemaParserCtxtPtr pctxt)
18739 int res, olderrs = pctxt->nberrors;
18752 if (pctxt->vctxt == NULL) {
18753 if (xmlSchemaCreateVCtxtOnPCtxt(pctxt) == -1)
18756 pctxt->vctxt->schema = pctxt->schema;
18758 res = xmlSchemaCheckFacet(facet, typeDecl, pctxt, name);
18762 pctxt->vctxt->schema = NULL;
18764 if (olderrs != pctxt->nberrors)
18765 return(pctxt->err);
19038 xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
19043 * @pctxt: the parser context
19056 xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
19108 if (xmlSchemaAttributeGroupExpandRefs(pctxt, gr) == -1)
19130 tmpWild = xmlSchemaAddWildcard(pctxt, pctxt->schema,
19135 if (xmlSchemaCloneWildcardNsConstraints(pctxt,
19143 if (xmlSchemaIntersectWildcards(pctxt, *completeWild,
19190 xmlSchemaCustomWarning(ACTXT_CAST pctxt,
19215 * @pctxt: the parser context
19226 xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
19234 if (xmlSchemaExpandAttributeGroupRefs(pctxt, WXS_BASIC_CAST attrGr,
19242 * @pctxt: the parser context
19252 xmlSchemaCheckAGPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
19288 xmlSchemaCustomErr(ACTXT_CAST pctxt,
19318 xmlSchemaCustomErr(ACTXT_CAST pctxt,
19386 xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
19412 xmlSchemaCustomErr(ACTXT_CAST pctxt,
19418 return(pctxt->err);
19428 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt,
19438 xmlSchemaCustomErr(ACTXT_CAST pctxt,
19443 return(pctxt->err);
19484 xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
19498 xmlSchemaCheckElementDeclComponent(head, pctxt);
19504 xmlSchemaPCustomErr(pctxt,
19526 xmlSchemaPCustomErrExt(pctxt,
19561 if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST pctxt, typeDef,
19566 xmlSchemaPCustomErrExt(pctxt,
19598 xmlSchemaPCustomErr(pctxt,
19615 xmlSchemaPErr(pctxt, elemDecl->node,
19630 vcret = xmlSchemaParseCheckCOSValidDefault(pctxt, node,
19767 * @pctxt: the schema parser context
19775 xmlSchemaCheckElementDeclConsistent(xmlSchemaParserCtxtPtr pctxt,
19802 ret = xmlSchemaCheckElementDeclConsistent(pctxt,
19826 xmlSchemaCustomErr(ACTXT_CAST pctxt,
19853 ret = xmlSchemaCheckElementDeclConsistent(pctxt, ctxtComponent,
19867 xmlSchemaInternalErr2(ACTXT_CAST pctxt,
20263 xmlSchemaParserCtxtPtr pctxt)
20269 xmlSchemaGetIDC(pctxt->schema, idc->ref->name,
20276 xmlSchemaPResCompAttrErr(pctxt,
20282 return(pctxt->err);
20287 xmlSchemaCustomErr(ACTXT_CAST pctxt,
20293 return(pctxt->err);
20307 xmlSchemaCustomErr(ACTXT_CAST pctxt,
20316 return(pctxt->err);
20325 xmlSchemaParserCtxtPtr pctxt)
20327 if (xmlSchemaGetAttributeDecl(pctxt->schema, prohib->name,
20330 xmlSchemaPResCompAttrErr(pctxt,
20350 xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt)
20353 xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs;
20401 xmlSchemaCustomErr(ACTXT_CAST pctxt,
20414 err = pctxt->err;
20505 xmlSchemaCustomErr(ACTXT_CAST pctxt,
20514 err = pctxt->err;
20525 xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt)
20528 xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs;
20581 err = xmlSchemaCheckDerivationOKRestriction2to4(pctxt,
20601 xmlSchemaAddComponents(xmlSchemaParserCtxtPtr pctxt,
20681 *table = xmlHashCreateDict(10, pctxt->dict);
20692 xmlSchemaCustomErr(ACTXT_CAST pctxt,
20710 if (xmlSchemaAddComponents(pctxt, rel->bucket) == -1)
20720 xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
20723 xmlSchemaConstructionCtxtPtr con = pctxt->constructor;
20729 #define FIXHFAILURE if (pctxt->err == XML_SCHEMAP_INTERNAL) goto exit_failure;
20756 xmlSchemaCheckSRCRedefineFirst(pctxt);
20761 xmlSchemaAddComponents(pctxt, rootBucket);
20763 pctxt->ctxtType = NULL;
20797 (xmlSchemaElementPtr) item, pctxt);
20803 (xmlSchemaTypePtr) item, pctxt);
20808 (xmlSchemaAttributePtr) item, pctxt);
20813 (xmlSchemaAttributeUsePtr) item, pctxt);
20821 WXS_QNAME_CAST item, pctxt);
20828 xmlSchemaResolveModelGroupParticleReferences(pctxt,
20836 (xmlSchemaIDCPtr) item, pctxt);
20845 WXS_ATTR_PROHIB_CAST item, pctxt);
20852 if (pctxt->nberrors != 0)
20872 (xmlSchemaTypePtr) item, pctxt);
20874 if (pctxt->nberrors != 0)
20879 (xmlSchemaModelGroupDefPtr) item, pctxt);
20881 if (pctxt->nberrors != 0)
20886 (xmlSchemaAttributeGroupPtr) item, pctxt);
20888 if (pctxt->nberrors != 0)
20895 if (pctxt->nberrors != 0)
20910 xmlSchemaModelGroupToModelGroupDefFixup(pctxt,
20917 if (pctxt->nberrors != 0)
20929 xmlSchemaAttributeGroupExpandRefs(pctxt,
20938 if (pctxt->nberrors != 0)
20950 xmlSchemaFixupSimpleTypeStageOne(pctxt,
20959 if (pctxt->nberrors != 0)
20970 xmlSchemaCheckUnionTypeDefCircular(pctxt,
20979 if (pctxt->nberrors != 0)
20990 xmlSchemaFixupSimpleTypeStageTwo(pctxt, WXS_TYPE_CAST item);
20998 if (pctxt->nberrors != 0)
21010 xmlSchemaCheckAttrPropsCorrect(pctxt, WXS_ATTR_CAST item);
21017 if (pctxt->nberrors != 0)
21027 xmlSchemaCheckAttrUsePropsCorrect(pctxt,
21036 if (pctxt->nberrors != 0)
21049 xmlSchemaCheckAGPropsCorrect(pctxt, WXS_ATTR_GROUP_CAST item);
21057 if (pctxt->nberrors != 0)
21063 if (WXS_CONSTRUCTOR(pctxt)->redefs != NULL)
21064 xmlSchemaCheckSRCRedefineSecond(pctxt);
21065 if (pctxt->nberrors != 0)
21076 xmlSchemaFixupComplexType(pctxt, WXS_TYPE_CAST item);
21084 if (pctxt->nberrors != 0)
21106 (xmlSchemaElementPtr) elemDecl, pctxt);
21119 xmlSchemaCheckElementDeclConsistent(pctxt,
21130 if (pctxt->nberrors != 0)
21142 xmlSchemaBuildContentModel((xmlSchemaTypePtr) item, pctxt);
21149 if (pctxt->nberrors != 0)
21157 ret = pctxt->err;
21478 * @pctxt: a schema parser context
21498 xmlSchemaParserCtxtPtr pctxt;
21504 if (vctxt->pctxt == NULL) {
21509 pctxt = vctxt->pctxt;
21510 if (pctxt->constructor == NULL) {
21518 location = xmlSchemaBuildAbsoluteURI(pctxt->dict,
21525 ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT,
21545 (WXS_CONSTRUCTOR(pctxt)->bucket == NULL))
21546 WXS_CONSTRUCTOR(pctxt)->bucket = bucket;
21557 pctxt->nberrors = 0;
21558 pctxt->err = 0;
21559 pctxt->doc = bucket->doc;
21561 ret = xmlSchemaParseNewDocWithContext(pctxt, schema, bucket);
21563 pctxt->doc = NULL;
21567 if ((ret == 0) && (pctxt->nberrors != 0))
21568 ret = pctxt->err;
21569 if (pctxt->nberrors == 0) {
21576 xmlSchemaFixupComponents(pctxt, bucket);
21577 ret = pctxt->err;
21584 vctxt->nberrors += pctxt->nberrors;
21587 vctxt->nberrors += pctxt->nberrors;
21589 pctxt->doc = NULL;
21592 pctxt->doc = NULL;
24861 * if ((vctxt->pctxt == NULL) &&
27490 if (ctxt->pctxt != NULL)
27491 xmlSchemaFreeParserCtxt(ctxt->pctxt);
27599 if (ctxt->pctxt != NULL)
27600 xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx);
27621 if (ctxt->pctxt != NULL)
27622 xmlSchemaSetParserStructuredErrors(ctxt->pctxt, serror, ctx);
27888 xmlSchemaParserCtxtPtr pctxt;
27897 if ((vctxt->pctxt == NULL) &&
27900 pctxt = vctxt->pctxt;
27901 pctxt->xsiAssemble = 1;
27905 vctxt->schema = xmlSchemaNewSchema(pctxt);
27911 pctxt->constructor = xmlSchemaConstructionCtxtCreate(pctxt->dict);
27912 if (pctxt->constructor == NULL)
27914 pctxt->constructor->mainSchema = vctxt->schema;
27918 pctxt->ownsConstructor = 1;
28575 xmlParserCtxtPtr pctxt = NULL;
28585 pctxt = xmlNewParserCtxt();
28586 if (pctxt == NULL)
28588 old_sax = pctxt->sax;
28589 pctxt->sax = sax;
28590 pctxt->userData = user_data;
28593 xmlCtxtUseOptions(pctxt, options);
28595 pctxt->linenumbers = 1;
28597 inputStream = xmlNewIOInputStream(pctxt, input, enc);;
28602 inputPush(pctxt, inputStream);
28603 ctxt->parserCtxt = pctxt;
28609 plug = xmlSchemaSAXPlug(ctxt, &(pctxt->sax), &(pctxt->userData));
28616 ctxt->sax = pctxt->sax;
28634 if (pctxt != NULL) {
28635 pctxt->sax = old_sax;
28636 xmlFreeParserCtxt(pctxt);