Lines Matching refs:vctxt
631 xmlSchemaValidCtxtPtr vctxt; member
1082 xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt);
2052 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctxt; in xmlSchemaErr4Line() local
2056 vctxt->nberrors++; in xmlSchemaErr4Line()
2057 vctxt->err = error; in xmlSchemaErr4Line()
2058 channel = vctxt->error; in xmlSchemaErr4Line()
2060 channel = vctxt->warning; in xmlSchemaErr4Line()
2062 schannel = vctxt->serror; in xmlSchemaErr4Line()
2063 data = vctxt->errCtxt; in xmlSchemaErr4Line()
2071 (vctxt->depth >= 0) && in xmlSchemaErr4Line()
2072 (vctxt->inode != NULL)) { in xmlSchemaErr4Line()
2073 node = vctxt->inode->node; in xmlSchemaErr4Line()
2079 (vctxt->parserCtxt != NULL) && in xmlSchemaErr4Line()
2080 (vctxt->parserCtxt->input != NULL)) { in xmlSchemaErr4Line()
2081 file = vctxt->parserCtxt->input->filename; in xmlSchemaErr4Line()
2082 line = vctxt->parserCtxt->input->line; in xmlSchemaErr4Line()
2083 col = vctxt->parserCtxt->input->col; in xmlSchemaErr4Line()
2094 if (vctxt->doc != NULL) in xmlSchemaErr4Line()
2095 file = (const char *) vctxt->doc->URL; in xmlSchemaErr4Line()
2096 else if ((vctxt->parserCtxt != NULL) && in xmlSchemaErr4Line()
2097 (vctxt->parserCtxt->input != NULL)) in xmlSchemaErr4Line()
2098 file = vctxt->parserCtxt->input->filename; in xmlSchemaErr4Line()
2100 if (vctxt->locFunc != NULL) { in xmlSchemaErr4Line()
2104 vctxt->locFunc(vctxt->locCtxt, &f, &l); in xmlSchemaErr4Line()
2111 if ((file == NULL) && (vctxt->filename != NULL)) in xmlSchemaErr4Line()
2112 file = vctxt->filename; in xmlSchemaErr4Line()
2230 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) actxt; in xmlSchemaFormatNodeForError() local
2234 if (vctxt->inode->nodeType == XML_ATTRIBUTE_NODE) { in xmlSchemaFormatNodeForError()
2236 vctxt->elemInfos[vctxt->depth]; in xmlSchemaFormatNodeForError()
2248 vctxt->inode->nsName, vctxt->inode->localName)); in xmlSchemaFormatNodeForError()
2396 xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaKeyrefErr() argument
2409 xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR, in xmlSchemaKeyrefErr()
2412 vctxt->nodeQNames->items[idcNode->nodeQNameID +1], in xmlSchemaKeyrefErr()
2413 vctxt->nodeQNames->items[idcNode->nodeQNameID]), in xmlSchemaKeyrefErr()
2770 xmlSchemaCustomErr(ACTXT_CAST vctxt, err, NULL, type, msg, NULL, NULL);
2772 #define VERROR_INT(func, msg) xmlSchemaInternalErr(ACTXT_CAST vctxt, func, msg);
10027 xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaCreatePCtxtOnVCtxt() argument
10029 if (vctxt->pctxt == NULL) { in xmlSchemaCreatePCtxtOnVCtxt()
10030 if (vctxt->schema != NULL) in xmlSchemaCreatePCtxtOnVCtxt()
10031 vctxt->pctxt = in xmlSchemaCreatePCtxtOnVCtxt()
10032 xmlSchemaNewParserCtxtUseDict("*", vctxt->schema->dict); in xmlSchemaCreatePCtxtOnVCtxt()
10034 vctxt->pctxt = xmlSchemaNewParserCtxt("*"); in xmlSchemaCreatePCtxtOnVCtxt()
10035 if (vctxt->pctxt == NULL) { in xmlSchemaCreatePCtxtOnVCtxt()
10041 xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error, in xmlSchemaCreatePCtxtOnVCtxt()
10042 vctxt->warning, vctxt->errCtxt); in xmlSchemaCreatePCtxtOnVCtxt()
10043 xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror, in xmlSchemaCreatePCtxtOnVCtxt()
10044 vctxt->errCtxt); in xmlSchemaCreatePCtxtOnVCtxt()
12568 if (ctxt->vctxt != NULL) { in xmlSchemaFreeParserCtxt()
12569 xmlSchemaFreeValidCtxt(ctxt->vctxt); in xmlSchemaFreeParserCtxt()
15798 if (ctxt->vctxt == NULL) { in xmlSchemaCreateVCtxtOnPCtxt()
15799 ctxt->vctxt = xmlSchemaNewValidCtxt(NULL); in xmlSchemaCreateVCtxtOnPCtxt()
15800 if (ctxt->vctxt == NULL) { in xmlSchemaCreateVCtxtOnPCtxt()
15809 xmlSchemaSetValidErrors(ctxt->vctxt, in xmlSchemaCreateVCtxtOnPCtxt()
15811 xmlSchemaSetValidStructuredErrors(ctxt->vctxt, in xmlSchemaCreateVCtxtOnPCtxt()
18893 if (pctxt->vctxt == NULL) { in xmlSchemaCheckFacetValues()
18897 pctxt->vctxt->schema = pctxt->schema; in xmlSchemaCheckFacetValues()
18903 pctxt->vctxt->schema = NULL; in xmlSchemaCheckFacetValues()
21465 if (ctxt->vctxt != NULL) in xmlSchemaSetParserErrors()
21466 xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx); in xmlSchemaSetParserErrors()
21486 if (ctxt->vctxt != NULL) in xmlSchemaSetParserStructuredErrors()
21487 xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx); in xmlSchemaSetParserStructuredErrors()
21631 xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaAssembleByLocation() argument
21641 if ((vctxt == NULL) || (schema == NULL)) in xmlSchemaAssembleByLocation()
21644 if (vctxt->pctxt == NULL) { in xmlSchemaAssembleByLocation()
21649 pctxt = vctxt->pctxt; in xmlSchemaAssembleByLocation()
21674 xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC, in xmlSchemaAssembleByLocation()
21722 if ((ret != 0) && (vctxt->err == 0)) in xmlSchemaAssembleByLocation()
21723 vctxt->err = ret; in xmlSchemaAssembleByLocation()
21724 vctxt->nberrors += pctxt->nberrors; in xmlSchemaAssembleByLocation()
21727 vctxt->nberrors += pctxt->nberrors; in xmlSchemaAssembleByLocation()
21737 xmlSchemaGetMetaAttrInfo(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaGetMetaAttrInfo() argument
21740 if (vctxt->nbAttrInfos == 0) in xmlSchemaGetMetaAttrInfo()
21746 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaGetMetaAttrInfo()
21747 iattr = vctxt->attrInfos[i]; in xmlSchemaGetMetaAttrInfo()
21769 xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaAssembleByXSI() argument
21785 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaAssembleByXSI()
21788 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaAssembleByXSI()
21809 nsname = xmlDictLookup(vctxt->schema->dict, cur, end - cur); in xmlSchemaAssembleByXSI()
21828 xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC, in xmlSchemaAssembleByXSI()
21836 location = xmlDictLookup(vctxt->schema->dict, cur, end - cur); in xmlSchemaAssembleByXSI()
21838 ret = xmlSchemaAssembleByLocation(vctxt, vctxt->schema, in xmlSchemaAssembleByXSI()
21850 xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaLookupNamespace() argument
21853 if (vctxt->sax != NULL) { in xmlSchemaLookupNamespace()
21857 for (i = vctxt->depth; i >= 0; i--) { in xmlSchemaLookupNamespace()
21858 if (vctxt->elemInfos[i]->nbNsBindings != 0) { in xmlSchemaLookupNamespace()
21859 inode = vctxt->elemInfos[i]; in xmlSchemaLookupNamespace()
21877 } else if (vctxt->reader != NULL) { in xmlSchemaLookupNamespace()
21880 nsName = xmlTextReaderLookupNamespace(vctxt->reader, prefix); in xmlSchemaLookupNamespace()
21884 ret = xmlDictLookup(vctxt->dict, nsName, -1); in xmlSchemaLookupNamespace()
21893 if ((vctxt->inode->node == NULL) || in xmlSchemaLookupNamespace()
21894 (vctxt->inode->node->doc == NULL)) { in xmlSchemaLookupNamespace()
21899 ns = xmlSearchNs(vctxt->inode->node->doc, in xmlSchemaLookupNamespace()
21900 vctxt->inode->node, prefix); in xmlSchemaLookupNamespace()
21911 xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateNotation() argument
21920 if (vctxt && (vctxt->schema == NULL)) { in xmlSchemaValidateNotation()
21936 if (vctxt != NULL) in xmlSchemaValidateNotation()
21937 nsName = xmlSchemaLookupNamespace(vctxt, BAD_CAST prefix); in xmlSchemaValidateNotation()
21979 xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVAddNodeQName() argument
21985 lname = xmlDictLookup(vctxt->dict, lname, -1); in xmlSchemaVAddNodeQName()
21989 nsname = xmlDictLookup(vctxt->dict, nsname, -1); in xmlSchemaVAddNodeQName()
21993 for (i = 0; i < vctxt->nodeQNames->nbItems; i += 2) { in xmlSchemaVAddNodeQName()
21994 if ((vctxt->nodeQNames->items [i] == lname) && in xmlSchemaVAddNodeQName()
21995 (vctxt->nodeQNames->items[i +1] == nsname)) in xmlSchemaVAddNodeQName()
22000 i = vctxt->nodeQNames->nbItems; in xmlSchemaVAddNodeQName()
22001 xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) lname); in xmlSchemaVAddNodeQName()
22002 xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) nsname); in xmlSchemaVAddNodeQName()
22025 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) data; in xmlSchemaAugmentIDC() local
22030 xmlSchemaVErrMemory(vctxt, in xmlSchemaAugmentIDC()
22038 if (vctxt->aidcs == NULL) in xmlSchemaAugmentIDC()
22039 vctxt->aidcs = aidc; in xmlSchemaAugmentIDC()
22041 aidc->next = vctxt->aidcs; in xmlSchemaAugmentIDC()
22042 vctxt->aidcs = aidc; in xmlSchemaAugmentIDC()
22047 if ((vctxt->hasKeyrefs == 0) && in xmlSchemaAugmentIDC()
22049 vctxt->hasKeyrefs = 1; in xmlSchemaAugmentIDC()
22062 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) data; in xmlSchemaAugmentImportedIDC() local
22064 xmlHashScan(imported->schema->idcDef, xmlSchemaAugmentIDC, vctxt); in xmlSchemaAugmentImportedIDC()
22105 xmlSchemaIDCStoreNodeTableItem(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCStoreNodeTableItem() argument
22111 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22112 vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) in xmlSchemaIDCStoreNodeTableItem()
22114 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22115 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreNodeTableItem()
22119 vctxt->sizeIdcNodes = 20; in xmlSchemaIDCStoreNodeTableItem()
22120 } else if (vctxt->sizeIdcNodes <= vctxt->nbIdcNodes) { in xmlSchemaIDCStoreNodeTableItem()
22121 vctxt->sizeIdcNodes *= 2; in xmlSchemaIDCStoreNodeTableItem()
22122 vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) in xmlSchemaIDCStoreNodeTableItem()
22123 xmlRealloc(vctxt->idcNodes, vctxt->sizeIdcNodes * in xmlSchemaIDCStoreNodeTableItem()
22125 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22126 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreNodeTableItem()
22131 vctxt->idcNodes[vctxt->nbIdcNodes++] = item; in xmlSchemaIDCStoreNodeTableItem()
22146 xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCStoreKey() argument
22152 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22153 vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) in xmlSchemaIDCStoreKey()
22155 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22156 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreKey()
22160 vctxt->sizeIdcKeys = 40; in xmlSchemaIDCStoreKey()
22161 } else if (vctxt->sizeIdcKeys <= vctxt->nbIdcKeys) { in xmlSchemaIDCStoreKey()
22162 vctxt->sizeIdcKeys *= 2; in xmlSchemaIDCStoreKey()
22163 vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) in xmlSchemaIDCStoreKey()
22164 xmlRealloc(vctxt->idcKeys, vctxt->sizeIdcKeys * in xmlSchemaIDCStoreKey()
22166 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22167 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreKey()
22172 vctxt->idcKeys[vctxt->nbIdcKeys++] = key; in xmlSchemaIDCStoreKey()
22226 xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCAcquireBinding() argument
22231 ielem = vctxt->elemInfos[matcher->depth]; in xmlSchemaIDCAcquireBinding()
22258 xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, in xmlSchemaIDCAcquireTargetList()
22365 xmlSchemaIDCReleaseMatcherList(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCReleaseMatcherList() argument
22406 if (vctxt->idcMatcherCache != NULL) in xmlSchemaIDCReleaseMatcherList()
22407 matcher->nextCached = vctxt->idcMatcherCache; in xmlSchemaIDCReleaseMatcherList()
22408 vctxt->idcMatcherCache = matcher; in xmlSchemaIDCReleaseMatcherList()
22429 xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCAddStateObject() argument
22439 if (vctxt->xpathStatePool != NULL) { in xmlSchemaIDCAddStateObject()
22440 sto = vctxt->xpathStatePool; in xmlSchemaIDCAddStateObject()
22441 vctxt->xpathStatePool = sto->next; in xmlSchemaIDCAddStateObject()
22458 if (vctxt->xpathStates != NULL) in xmlSchemaIDCAddStateObject()
22459 sto->next = vctxt->xpathStates; in xmlSchemaIDCAddStateObject()
22460 vctxt->xpathStates = sto; in xmlSchemaIDCAddStateObject()
22479 sto->depth = vctxt->depth; in xmlSchemaIDCAddStateObject()
22502 xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaXPathEvaluate() argument
22506 int res, resolved = 0, depth = vctxt->depth; in xmlSchemaXPathEvaluate()
22508 if (vctxt->xpathStates == NULL) in xmlSchemaXPathEvaluate()
22518 xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaXPathEvaluate()
22519 vctxt->inode->localName), depth, nodeType); in xmlSchemaXPathEvaluate()
22526 first = vctxt->xpathStates; in xmlSchemaXPathEvaluate()
22539 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathEvaluate()
22542 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathEvaluate()
22583 vctxt->depth); in xmlSchemaXPathEvaluate()
22598 if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher, in xmlSchemaXPathEvaluate()
22616 if ((vctxt->inode->flags & in xmlSchemaXPathEvaluate()
22618 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; in xmlSchemaXPathEvaluate()
22628 sto = vctxt->xpathStates; in xmlSchemaXPathEvaluate()
22636 xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaFormatIDCKeySequence() argument
22680 xmlSchemaXPathPop(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaXPathPop() argument
22685 if (vctxt->xpathStates == NULL) in xmlSchemaXPathPop()
22687 sto = vctxt->xpathStates; in xmlSchemaXPathPop()
22709 xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaXPathProcessHistory() argument
22715 xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL; in xmlSchemaXPathProcessHistory()
22717 if (vctxt->xpathStates == NULL) in xmlSchemaXPathProcessHistory()
22719 sto = vctxt->xpathStates; in xmlSchemaXPathProcessHistory()
22726 xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaXPathProcessHistory()
22727 vctxt->inode->localName), vctxt->depth); in xmlSchemaXPathProcessHistory()
22787 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
22799 if ((key == NULL) && (vctxt->inode->val == NULL)) { in xmlSchemaXPathProcessHistory()
22896 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
22942 key->val = vctxt->inode->val; in xmlSchemaXPathProcessHistory()
22943 vctxt->inode->val = NULL; in xmlSchemaXPathProcessHistory()
22947 if (xmlSchemaIDCStoreKey(vctxt, key) == -1) { in xmlSchemaXPathProcessHistory()
23026 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); in xmlSchemaXPathProcessHistory()
23028 targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher); in xmlSchemaXPathProcessHistory()
23068 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
23072 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaXPathProcessHistory()
23098 if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) { in xmlSchemaXPathProcessHistory()
23110 ntItem->nodeQNameID = xmlSchemaVAddNodeQName(vctxt, in xmlSchemaXPathProcessHistory()
23111 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathProcessHistory()
23123 ntItem->node = vctxt->node; in xmlSchemaXPathProcessHistory()
23124 ntItem->nodeLine = vctxt->inode->nodeLine; in xmlSchemaXPathProcessHistory()
23152 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
23180 if (vctxt->xpathStates != sto) { in xmlSchemaXPathProcessHistory()
23189 vctxt->xpathStates = sto->next; in xmlSchemaXPathProcessHistory()
23190 sto->next = vctxt->xpathStatePool; in xmlSchemaXPathProcessHistory()
23194 vctxt->xpathStatePool = sto; in xmlSchemaXPathProcessHistory()
23213 xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCRegisterMatchers() argument
23229 (char *) xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaIDCRegisterMatchers()
23230 vctxt->inode->localName), vctxt->depth); in xmlSchemaIDCRegisterMatchers()
23234 if (vctxt->inode->idcMatchers != NULL) { in xmlSchemaIDCRegisterMatchers()
23253 vctxt->inode->hasKeyrefs = 1; in xmlSchemaIDCRegisterMatchers()
23257 aidc = vctxt->aidcs; in xmlSchemaIDCRegisterMatchers()
23270 (vctxt->depth < aidc->keyrefDepth)) in xmlSchemaIDCRegisterMatchers()
23271 aidc->keyrefDepth = vctxt->depth; in xmlSchemaIDCRegisterMatchers()
23277 aidc = vctxt->aidcs; in xmlSchemaIDCRegisterMatchers()
23291 if (vctxt->idcMatcherCache != NULL) { in xmlSchemaIDCRegisterMatchers()
23295 matcher = vctxt->idcMatcherCache; in xmlSchemaIDCRegisterMatchers()
23296 vctxt->idcMatcherCache = matcher->nextCached; in xmlSchemaIDCRegisterMatchers()
23302 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCRegisterMatchers()
23309 vctxt->inode->idcMatchers = matcher; in xmlSchemaIDCRegisterMatchers()
23315 matcher->depth = vctxt->depth; in xmlSchemaIDCRegisterMatchers()
23324 if (xmlSchemaIDCAddStateObject(vctxt, matcher, in xmlSchemaIDCRegisterMatchers()
23334 xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCFillNodeTables() argument
23358 if ((! vctxt->createIDCNodeTables) && in xmlSchemaIDCFillNodeTables()
23360 (matcher->aidc->keyrefDepth > vctxt->depth))) in xmlSchemaIDCFillNodeTables()
23368 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); in xmlSchemaIDCFillNodeTables()
23530 xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaBubbleIDCNodeTables() argument
23538 bind = vctxt->inode->idcTable; in xmlSchemaBubbleIDCNodeTables()
23544 parTable = &(vctxt->elemInfos[vctxt->depth -1]->idcTable); in xmlSchemaBubbleIDCNodeTables()
23556 if (! vctxt->createIDCNodeTables) { in xmlSchemaBubbleIDCNodeTables()
23557 aidc = vctxt->aidcs; in xmlSchemaBubbleIDCNodeTables()
23561 (aidc->keyrefDepth >= vctxt->depth)) { in xmlSchemaBubbleIDCNodeTables()
23756 if (! vctxt->psviExposeIDCNodeTables) { in xmlSchemaBubbleIDCNodeTables()
23825 xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaCheckCVCIDCKeyRef() argument
23830 matcher = vctxt->inode->idcMatchers; in xmlSchemaCheckCVCIDCKeyRef()
23848 bind = vctxt->inode->idcTable; in xmlSchemaCheckCVCIDCKeyRef()
23903 xmlSchemaKeyrefErr(vctxt, in xmlSchemaCheckCVCIDCKeyRef()
23908 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaCheckCVCIDCKeyRef()
23922 xmlSchemaKeyrefErr(vctxt, in xmlSchemaCheckCVCIDCKeyRef()
23926 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaCheckCVCIDCKeyRef()
23947 xmlSchemaGetFreshAttrInfo(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaGetFreshAttrInfo() argument
23953 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23954 vctxt->attrInfos = (xmlSchemaAttrInfoPtr *) in xmlSchemaGetFreshAttrInfo()
23956 vctxt->sizeAttrInfos = 1; in xmlSchemaGetFreshAttrInfo()
23957 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23958 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshAttrInfo()
23962 } else if (vctxt->sizeAttrInfos <= vctxt->nbAttrInfos) { in xmlSchemaGetFreshAttrInfo()
23963 vctxt->sizeAttrInfos++; in xmlSchemaGetFreshAttrInfo()
23964 vctxt->attrInfos = (xmlSchemaAttrInfoPtr *) in xmlSchemaGetFreshAttrInfo()
23965 xmlRealloc(vctxt->attrInfos, in xmlSchemaGetFreshAttrInfo()
23966 vctxt->sizeAttrInfos * sizeof(xmlSchemaAttrInfoPtr)); in xmlSchemaGetFreshAttrInfo()
23967 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23968 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshAttrInfo()
23973 iattr = vctxt->attrInfos[vctxt->nbAttrInfos++]; in xmlSchemaGetFreshAttrInfo()
23988 xmlSchemaVErrMemory(vctxt, "creating new attribute info", NULL); in xmlSchemaGetFreshAttrInfo()
23993 vctxt->attrInfos[vctxt->nbAttrInfos++] = iattr; in xmlSchemaGetFreshAttrInfo()
23999 xmlSchemaValidatorPushAttribute(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidatorPushAttribute() argument
24010 attr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaValidatorPushAttribute()
24061 xmlSchemaClearElemInfo(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaClearElemInfo() argument
24091 xmlSchemaIDCReleaseMatcherList(vctxt, ielem->idcMatchers); in xmlSchemaClearElemInfo()
24126 xmlSchemaGetFreshElemInfo(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaGetFreshElemInfo() argument
24130 if (vctxt->depth > vctxt->sizeElemInfos) { in xmlSchemaGetFreshElemInfo()
24135 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24136 vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) in xmlSchemaGetFreshElemInfo()
24138 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24139 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24143 memset(vctxt->elemInfos, 0, 10 * sizeof(xmlSchemaNodeInfoPtr)); in xmlSchemaGetFreshElemInfo()
24144 vctxt->sizeElemInfos = 10; in xmlSchemaGetFreshElemInfo()
24145 } else if (vctxt->sizeElemInfos <= vctxt->depth) { in xmlSchemaGetFreshElemInfo()
24146 int i = vctxt->sizeElemInfos; in xmlSchemaGetFreshElemInfo()
24148 vctxt->sizeElemInfos *= 2; in xmlSchemaGetFreshElemInfo()
24149 vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) in xmlSchemaGetFreshElemInfo()
24150 xmlRealloc(vctxt->elemInfos, vctxt->sizeElemInfos * in xmlSchemaGetFreshElemInfo()
24152 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24153 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24161 for (; i < vctxt->sizeElemInfos; i++) in xmlSchemaGetFreshElemInfo()
24162 vctxt->elemInfos[i] = NULL; in xmlSchemaGetFreshElemInfo()
24164 info = vctxt->elemInfos[vctxt->depth]; in xmlSchemaGetFreshElemInfo()
24170 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24174 vctxt->elemInfos[vctxt->depth] = info; in xmlSchemaGetFreshElemInfo()
24184 info->depth = vctxt->depth; in xmlSchemaGetFreshElemInfo()
24189 #define ACTIVATE_ATTRIBUTE(item) vctxt->inode = (xmlSchemaNodeInfoPtr) item;
24190 #define ACTIVATE_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth];
24191 #define ACTIVATE_PARENT_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth -1];
24443 xmlSchemaValidateQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateQName() argument
24473 nsName = xmlSchemaLookupNamespace(vctxt, prefix); in xmlSchemaValidateQName()
24483 xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL, in xmlSchemaValidateQName()
24851 xmlSchemaVExpandQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVExpandQName() argument
24867 xmlSchemaSimpleTypeErr(ACTXT_CAST vctxt, in xmlSchemaVExpandQName()
24882 *localName = xmlDictLookup(vctxt->dict, value, -1); in xmlSchemaVExpandQName()
24884 *localName = xmlDictLookup(vctxt->dict, local, -1); in xmlSchemaVExpandQName()
24888 *nsName = xmlSchemaLookupNamespace(vctxt, prefix); in xmlSchemaVExpandQName()
24896 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVExpandQName()
24910 xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaProcessXSIType() argument
24939 ret = xmlSchemaVExpandQName(vctxt, iattr->value, in xmlSchemaProcessXSIType()
24954 *localType = xmlSchemaGetType(vctxt->schema, local, nsName); in xmlSchemaProcessXSIType()
24958 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaProcessXSIType()
24965 ret = vctxt->err; in xmlSchemaProcessXSIType()
25012 if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType, in xmlSchemaProcessXSIType()
25016 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaProcessXSIType()
25026 ret = vctxt->err; in xmlSchemaProcessXSIType()
25040 xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateElemDecl() argument
25042 xmlSchemaElementPtr elemDecl = vctxt->inode->decl; in xmlSchemaValidateElemDecl()
25051 return (vctxt->err); in xmlSchemaValidateElemDecl()
25060 return (vctxt->err); in xmlSchemaValidateElemDecl()
25067 if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElemDecl()
25074 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemDecl()
25082 ACTXT_CAST vctxt, NULL, in xmlSchemaValidateElemDecl()
25113 vctxt->inode->flags |= in xmlSchemaValidateElemDecl()
25123 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemDecl()
25128 ret = xmlSchemaProcessXSIType(vctxt, iattr, &localType, in xmlSchemaValidateElemDecl()
25140 vctxt->inode->flags |= XML_SCHEMA_ELEM_INFO_LOCAL_TYPE; in xmlSchemaValidateElemDecl()
25149 (xmlSchemaIDCRegisterMatchers(vctxt, elemDecl) == -1)) in xmlSchemaValidateElemDecl()
25162 vctxt->inode->typeDef = actualType; in xmlSchemaValidateElemDecl()
25168 xmlSchemaVAttributesSimple(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVAttributesSimple() argument
25180 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesSimple()
25182 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesSimple()
25183 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesSimple()
25186 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesSimple()
25199 xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaClearAttrInfos() argument
25204 if (vctxt->nbAttrInfos == 0) in xmlSchemaClearAttrInfos()
25206 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaClearAttrInfos()
25207 attr = vctxt->attrInfos[i]; in xmlSchemaClearAttrInfos()
25224 vctxt->nbAttrInfos = 0; in xmlSchemaClearAttrInfos()
25238 xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVAttributesComplex() argument
25240 xmlSchemaTypePtr type = vctxt->inode->typeDef; in xmlSchemaVAttributesComplex()
25272 nbAttrs = vctxt->nbAttrInfos; in xmlSchemaVAttributesComplex()
25282 iattr = vctxt->attrInfos[j]; in xmlSchemaVAttributesComplex()
25335 tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaVAttributesComplex()
25351 tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaVAttributesComplex()
25367 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesComplex()
25378 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25421 iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, in xmlSchemaVAttributesComplex()
25487 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesComplex()
25494 if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { in xmlSchemaVAttributesComplex()
25495 xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth]; in xmlSchemaVAttributesComplex()
25502 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesComplex()
25503 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25524 if (vctxt->xpathStates != NULL) { in xmlSchemaVAttributesComplex()
25528 xpathRes = xmlSchemaXPathEvaluate(vctxt, in xmlSchemaVAttributesComplex()
25623 ns = xmlNewNs(vctxt->validationRoot, in xmlSchemaVAttributesComplex()
25645 if (vctxt->value != NULL) { in xmlSchemaVAttributesComplex()
25649 xmlSchemaFreeValue(vctxt->value); in xmlSchemaVAttributesComplex()
25650 vctxt->value = NULL; in xmlSchemaVAttributesComplex()
25677 ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25682 ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25764 if (xmlSchemaXPathProcessHistory(vctxt, in xmlSchemaVAttributesComplex()
25765 vctxt->depth +1) == -1) { in xmlSchemaVAttributesComplex()
25770 } else if (vctxt->xpathStates != NULL) in xmlSchemaVAttributesComplex()
25771 xmlSchemaXPathPop(vctxt); in xmlSchemaVAttributesComplex()
25777 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesComplex()
25778 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25789 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25804 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25823 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25826 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25843 xmlSchemaValidateElemWildcard(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateElemWildcard() argument
25846 xmlSchemaWildcardPtr wild = (xmlSchemaWildcardPtr) vctxt->inode->decl; in xmlSchemaValidateElemWildcard()
25869 decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateElemWildcard()
25870 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaValidateElemWildcard()
25872 vctxt->inode->decl = decl; in xmlSchemaValidateElemWildcard()
25881 return (vctxt->err); in xmlSchemaValidateElemWildcard()
25883 if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElemWildcard()
25891 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemWildcard()
25894 if (xmlSchemaProcessXSIType(vctxt, iattr, in xmlSchemaValidateElemWildcard()
25895 &(vctxt->inode->typeDef), NULL) == -1) { in xmlSchemaValidateElemWildcard()
25912 vctxt->inode->typeDef = in xmlSchemaValidateElemWildcard()
25925 xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaCheckCOSValidDefault() argument
25930 xmlSchemaNodeInfoPtr inode = vctxt->inode; in xmlSchemaCheckCOSValidDefault()
25973 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, in xmlSchemaCheckCOSValidDefault()
25978 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, in xmlSchemaCheckCOSValidDefault()
26018 xmlSchemaValidatorPushElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidatorPushElem() argument
26020 vctxt->inode = xmlSchemaGetFreshElemInfo(vctxt); in xmlSchemaValidatorPushElem()
26021 if (vctxt->inode == NULL) { in xmlSchemaValidatorPushElem()
26026 vctxt->nbAttrInfos = 0; in xmlSchemaValidatorPushElem()
26031 xmlSchemaVCheckINodeDataType(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVCheckINodeDataType() argument
26038 ACTXT_CAST vctxt, NULL, in xmlSchemaVCheckINodeDataType()
26042 ACTXT_CAST vctxt, NULL, in xmlSchemaVCheckINodeDataType()
26052 xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidatorPopElem() argument
26055 xmlSchemaNodeInfoPtr inode = vctxt->inode; in xmlSchemaValidatorPopElem()
26057 if (vctxt->nbAttrInfos != 0) in xmlSchemaValidatorPopElem()
26058 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaValidatorPopElem()
26065 vctxt->skipDepth = vctxt->depth -1; in xmlSchemaValidatorPopElem()
26099 xmlSchemaVContentModelCallback, vctxt); in xmlSchemaValidatorPopElem()
26138 xmlSchemaComplexTypeErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26169 if (vctxt->value != NULL) { in xmlSchemaValidatorPopElem()
26170 xmlSchemaFreeValue(vctxt->value); in xmlSchemaValidatorPopElem()
26171 vctxt->value = NULL; in xmlSchemaValidatorPopElem()
26181 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26184 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26223 ret = xmlSchemaCheckCOSValidDefault(vctxt, in xmlSchemaValidatorPopElem()
26248 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26251 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26268 if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) && in xmlSchemaValidatorPopElem()
26305 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26320 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26376 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26399 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26413 if (vctxt->depth < 0) { in xmlSchemaValidatorPopElem()
26417 if (vctxt->depth == vctxt->skipDepth) in xmlSchemaValidatorPopElem()
26418 vctxt->skipDepth = -1; in xmlSchemaValidatorPopElem()
26423 (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1)) in xmlSchemaValidatorPopElem()
26442 (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) in xmlSchemaValidatorPopElem()
26444 if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1) in xmlSchemaValidatorPopElem()
26450 if (vctxt->inode->hasKeyrefs) in xmlSchemaValidatorPopElem()
26451 if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) in xmlSchemaValidatorPopElem()
26463 if ((vctxt->depth > 0) && in xmlSchemaValidatorPopElem()
26464 (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) in xmlSchemaValidatorPopElem()
26469 if (xmlSchemaBubbleIDCNodeTables(vctxt) == -1) in xmlSchemaValidatorPopElem()
26478 xmlSchemaClearElemInfo(vctxt, inode); in xmlSchemaValidatorPopElem()
26482 if (vctxt->depth == 0) { in xmlSchemaValidatorPopElem()
26483 vctxt->depth--; in xmlSchemaValidatorPopElem()
26484 vctxt->inode = NULL; in xmlSchemaValidatorPopElem()
26490 if (vctxt->aidcs != NULL) { in xmlSchemaValidatorPopElem()
26491 xmlSchemaIDCAugPtr aidc = vctxt->aidcs; in xmlSchemaValidatorPopElem()
26493 if (aidc->keyrefDepth == vctxt->depth) { in xmlSchemaValidatorPopElem()
26504 vctxt->depth--; in xmlSchemaValidatorPopElem()
26505 vctxt->inode = vctxt->elemInfos[vctxt->depth]; in xmlSchemaValidatorPopElem()
26513 vctxt->err = -1; in xmlSchemaValidatorPopElem()
26522 xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateChildElem() argument
26528 if (vctxt->depth <= 0) { in xmlSchemaValidateChildElem()
26533 pielem = vctxt->elemInfos[vctxt->depth -1]; in xmlSchemaValidateChildElem()
26560 vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateChildElem()
26561 vctxt->inode->localName, in xmlSchemaValidateChildElem()
26562 vctxt->inode->nsName); in xmlSchemaValidateChildElem()
26564 if (vctxt->inode->decl == NULL) { in xmlSchemaValidateChildElem()
26570 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateChildElem()
26573 ret = xmlSchemaProcessXSIType(vctxt, iattr, in xmlSchemaValidateChildElem()
26574 &(vctxt->inode->typeDef), NULL); in xmlSchemaValidateChildElem()
26595 vctxt->inode->typeDef = in xmlSchemaValidateChildElem()
26647 xmlSchemaVContentModelCallback, vctxt); in xmlSchemaValidateChildElem()
26669 vctxt->inode->localName, in xmlSchemaValidateChildElem()
26670 vctxt->inode->nsName, in xmlSchemaValidateChildElem()
26671 vctxt->inode); in xmlSchemaValidateChildElem()
26676 vctxt->inode->localName, pielem->localName); in xmlSchemaValidateChildElem()
26680 vctxt->inode->localName, pielem->localName); in xmlSchemaValidateChildElem()
26682 if (vctxt->err == XML_SCHEMAV_INTERNAL) { in xmlSchemaValidateChildElem()
26690 xmlSchemaComplexTypeErr(ACTXT_CAST vctxt, in xmlSchemaValidateChildElem()
26694 ret = vctxt->err; in xmlSchemaValidateChildElem()
26723 ret = vctxt->err; in xmlSchemaValidateChildElem()
26736 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateChildElem()
26737 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_NOT_EXPECTED; in xmlSchemaValidateChildElem()
26747 xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVPushText() argument
26762 if (INODE_NILLED(vctxt->inode)) { in xmlSchemaVPushText()
26771 return (vctxt->err); in xmlSchemaVPushText()
26778 if (vctxt->inode->typeDef->contentType == in xmlSchemaVPushText()
26783 return (vctxt->err); in xmlSchemaVPushText()
26786 if (vctxt->inode->typeDef->contentType == in xmlSchemaVPushText()
26801 return (vctxt->err); in xmlSchemaVPushText()
26813 if ((vctxt->inode->typeDef->contentType == XML_SCHEMA_CONTENT_MIXED) && in xmlSchemaVPushText()
26814 ((vctxt->inode->decl == NULL) || in xmlSchemaVPushText()
26815 (vctxt->inode->decl->value == NULL))) in xmlSchemaVPushText()
26818 if (vctxt->inode->value == NULL) { in xmlSchemaVPushText()
26827 vctxt->inode->value = value; in xmlSchemaVPushText()
26834 vctxt->inode->value = value; in xmlSchemaVPushText()
26837 vctxt->inode->flags |= in xmlSchemaVPushText()
26846 vctxt->inode->value = BAD_CAST xmlStrndup(value, len); in xmlSchemaVPushText()
26848 vctxt->inode->value = BAD_CAST xmlStrdup(value); in xmlSchemaVPushText()
26849 vctxt->inode->flags |= in xmlSchemaVPushText()
26861 if (vctxt->inode->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES) { in xmlSchemaVPushText()
26862 vctxt->inode->value = BAD_CAST xmlStrncat( in xmlSchemaVPushText()
26863 (xmlChar *) vctxt->inode->value, value, len); in xmlSchemaVPushText()
26865 vctxt->inode->value = in xmlSchemaVPushText()
26866 BAD_CAST xmlStrncatNew(vctxt->inode->value, value, len); in xmlSchemaVPushText()
26867 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES; in xmlSchemaVPushText()
26875 xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateElem() argument
26879 if ((vctxt->skipDepth != -1) && in xmlSchemaValidateElem()
26880 (vctxt->depth >= vctxt->skipDepth)) { in xmlSchemaValidateElem()
26885 if (vctxt->xsiAssemble) { in xmlSchemaValidateElem()
26896 ret = xmlSchemaAssembleByXSI(vctxt); in xmlSchemaValidateElem()
26900 vctxt->skipDepth = 0; in xmlSchemaValidateElem()
26907 xmlHashScan(vctxt->schema->schemasImports, xmlSchemaAugmentImportedIDC, in xmlSchemaValidateElem()
26908 vctxt); in xmlSchemaValidateElem()
26910 if (vctxt->depth > 0) { in xmlSchemaValidateElem()
26915 ret = xmlSchemaValidateChildElem(vctxt); in xmlSchemaValidateElem()
26924 if (vctxt->depth == vctxt->skipDepth) in xmlSchemaValidateElem()
26926 if ((vctxt->inode->decl == NULL) && in xmlSchemaValidateElem()
26927 (vctxt->inode->typeDef == NULL)) { in xmlSchemaValidateElem()
26937 vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateElem()
26938 vctxt->inode->localName, in xmlSchemaValidateElem()
26939 vctxt->inode->nsName); in xmlSchemaValidateElem()
26940 if (vctxt->inode->decl == NULL) { in xmlSchemaValidateElem()
26949 if (vctxt->inode->decl == NULL) in xmlSchemaValidateElem()
26952 if (vctxt->inode->decl->type == XML_SCHEMA_TYPE_ANY) { in xmlSchemaValidateElem()
26957 ret = xmlSchemaValidateElemWildcard(vctxt, &skip); in xmlSchemaValidateElem()
26967 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateElem()
26974 if (vctxt->inode->decl->type != XML_SCHEMA_TYPE_ELEMENT) { in xmlSchemaValidateElem()
26978 vctxt->inode->decl = NULL; in xmlSchemaValidateElem()
26985 ret = xmlSchemaValidateElemDecl(vctxt); in xmlSchemaValidateElem()
26999 if (vctxt->inode->typeDef == NULL) { in xmlSchemaValidateElem()
27000 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE; in xmlSchemaValidateElem()
27006 if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) { in xmlSchemaValidateElem()
27007 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE; in xmlSchemaValidateElem()
27018 if (vctxt->xpathStates != NULL) { in xmlSchemaValidateElem()
27019 ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE); in xmlSchemaValidateElem()
27020 vctxt->inode->appliedXPath = 1; in xmlSchemaValidateElem()
27030 if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) { in xmlSchemaValidateElem()
27031 if ((vctxt->nbAttrInfos != 0) || in xmlSchemaValidateElem()
27032 (vctxt->inode->typeDef->attrUses != NULL)) { in xmlSchemaValidateElem()
27034 ret = xmlSchemaVAttributesComplex(vctxt); in xmlSchemaValidateElem()
27036 } else if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElem()
27038 ret = xmlSchemaVAttributesSimple(vctxt); in xmlSchemaValidateElem()
27043 if (vctxt->nbAttrInfos != 0) in xmlSchemaValidateElem()
27044 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaValidateElem()
27057 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateElem()
27065 xmlSchemaVReaderWalk(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVReaderWalk() argument
27071 vctxt->depth = -1; in xmlSchemaVReaderWalk()
27072 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27077 nodeType = xmlTextReaderNodeType(vctxt->reader); in xmlSchemaVReaderWalk()
27080 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27087 depth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27088 nodeType = xmlTextReaderNodeType(vctxt->reader); in xmlSchemaVReaderWalk()
27092 vctxt->depth++; in xmlSchemaVReaderWalk()
27093 if (xmlSchemaValidatorPushElem(vctxt) == -1) { in xmlSchemaVReaderWalk()
27098 ielem = vctxt->inode; in xmlSchemaVReaderWalk()
27099 ielem->localName = xmlTextReaderLocalName(vctxt->reader); in xmlSchemaVReaderWalk()
27100 ielem->nsName = xmlTextReaderNamespaceUri(vctxt->reader); in xmlSchemaVReaderWalk()
27105 ret = xmlTextReaderIsEmptyElement(vctxt->reader); in xmlSchemaVReaderWalk()
27117 vctxt->nbAttrInfos = 0; in xmlSchemaVReaderWalk()
27118 ret = xmlTextReaderMoveToFirstAttribute(vctxt->reader); in xmlSchemaVReaderWalk()
27130 if (xmlSchemaValidatorPushAttribute(vctxt, NULL, in xmlSchemaVReaderWalk()
27131 (const xmlChar *) xmlTextReaderLocalName(vctxt->reader), in xmlSchemaVReaderWalk()
27132 xmlTextReaderNamespaceUri(vctxt->reader), 1, in xmlSchemaVReaderWalk()
27133 xmlTextReaderValue(vctxt->reader), 1) == -1) { in xmlSchemaVReaderWalk()
27139 ret = xmlTextReaderMoveToNextAttribute(vctxt->reader); in xmlSchemaVReaderWalk()
27149 ret = xmlTextReaderMoveToElement(vctxt->reader); in xmlSchemaVReaderWalk()
27159 ret= xmlSchemaValidateElem(vctxt); in xmlSchemaVReaderWalk()
27168 if (vctxt->depth == vctxt->skipDepth) { in xmlSchemaVReaderWalk()
27174 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27175 curDepth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27177 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27178 curDepth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27201 ret = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaVReaderWalk()
27210 if (vctxt->depth >= 0) in xmlSchemaVReaderWalk()
27211 ielem = vctxt->inode; in xmlSchemaVReaderWalk()
27226 value = xmlTextReaderValue(vctxt->reader); in xmlSchemaVReaderWalk()
27227 ret = xmlSchemaVPushText(vctxt, nodeType, BAD_CAST value, in xmlSchemaVReaderWalk()
27246 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27270 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleText() local
27272 if (vctxt->depth < 0) in xmlSchemaSAXHandleText()
27274 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleText()
27276 if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) in xmlSchemaSAXHandleText()
27277 vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY; in xmlSchemaSAXHandleText()
27278 if (xmlSchemaVPushText(vctxt, XML_TEXT_NODE, ch, len, in xmlSchemaSAXHandleText()
27282 vctxt->err = -1; in xmlSchemaSAXHandleText()
27283 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleText()
27295 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleCDataSection() local
27297 if (vctxt->depth < 0) in xmlSchemaSAXHandleCDataSection()
27299 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleCDataSection()
27301 if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) in xmlSchemaSAXHandleCDataSection()
27302 vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY; in xmlSchemaSAXHandleCDataSection()
27303 if (xmlSchemaVPushText(vctxt, XML_CDATA_SECTION_NODE, ch, len, in xmlSchemaSAXHandleCDataSection()
27307 vctxt->err = -1; in xmlSchemaSAXHandleCDataSection()
27308 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleCDataSection()
27316 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleReference() local
27318 if (vctxt->depth < 0) in xmlSchemaSAXHandleReference()
27320 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleReference()
27337 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleStartElementNs() local
27348 vctxt->depth++; in xmlSchemaSAXHandleStartElementNs()
27349 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleStartElementNs()
27354 if (xmlSchemaValidatorPushElem(vctxt) == -1) { in xmlSchemaSAXHandleStartElementNs()
27359 ielem = vctxt->inode; in xmlSchemaSAXHandleStartElementNs()
27363 ielem->nodeLine = xmlSAX2GetLineNumber(vctxt->parserCtxt); in xmlSchemaSAXHandleStartElementNs()
27384 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27398 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27438 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27461 ret = xmlSchemaValidatorPushAttribute(vctxt, in xmlSchemaSAXHandleStartElementNs()
27474 ret = xmlSchemaValidateElem(vctxt); in xmlSchemaSAXHandleStartElementNs()
27487 vctxt->err = -1; in xmlSchemaSAXHandleStartElementNs()
27488 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleStartElementNs()
27498 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleEndElementNs() local
27504 if (vctxt->skipDepth != -1) { in xmlSchemaSAXHandleEndElementNs()
27505 if (vctxt->depth > vctxt->skipDepth) { in xmlSchemaSAXHandleEndElementNs()
27506 vctxt->depth--; in xmlSchemaSAXHandleEndElementNs()
27509 vctxt->skipDepth = -1; in xmlSchemaSAXHandleEndElementNs()
27514 if ((!xmlStrEqual(vctxt->inode->localName, localname)) || in xmlSchemaSAXHandleEndElementNs()
27515 (!xmlStrEqual(vctxt->inode->nsName, URI))) { in xmlSchemaSAXHandleEndElementNs()
27519 res = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaSAXHandleEndElementNs()
27531 vctxt->err = -1; in xmlSchemaSAXHandleEndElementNs()
27532 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleEndElementNs()
27577 xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, const char *filename) { in xmlSchemaValidateSetFilename() argument
27578 if (vctxt == NULL) in xmlSchemaValidateSetFilename()
27580 if (vctxt->filename != NULL) in xmlSchemaValidateSetFilename()
27581 xmlFree(vctxt->filename); in xmlSchemaValidateSetFilename()
27583 vctxt->filename = (char *) xmlStrdup((const xmlChar *) filename); in xmlSchemaValidateSetFilename()
27585 vctxt->filename = NULL; in xmlSchemaValidateSetFilename()
27596 xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaClearValidCtxt() argument
27598 if (vctxt == NULL) in xmlSchemaClearValidCtxt()
27606 vctxt->flags = 0; in xmlSchemaClearValidCtxt()
27607 vctxt->validationRoot = NULL; in xmlSchemaClearValidCtxt()
27608 vctxt->doc = NULL; in xmlSchemaClearValidCtxt()
27610 vctxt->reader = NULL; in xmlSchemaClearValidCtxt()
27612 vctxt->hasKeyrefs = 0; in xmlSchemaClearValidCtxt()
27614 if (vctxt->value != NULL) { in xmlSchemaClearValidCtxt()
27615 xmlSchemaFreeValue(vctxt->value); in xmlSchemaClearValidCtxt()
27616 vctxt->value = NULL; in xmlSchemaClearValidCtxt()
27621 if (vctxt->aidcs != NULL) { in xmlSchemaClearValidCtxt()
27622 xmlSchemaIDCAugPtr cur = vctxt->aidcs, next; in xmlSchemaClearValidCtxt()
27628 vctxt->aidcs = NULL; in xmlSchemaClearValidCtxt()
27630 if (vctxt->idcMatcherCache != NULL) { in xmlSchemaClearValidCtxt()
27631 xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp; in xmlSchemaClearValidCtxt()
27638 vctxt->idcMatcherCache = NULL; in xmlSchemaClearValidCtxt()
27642 if (vctxt->idcNodes != NULL) { in xmlSchemaClearValidCtxt()
27646 for (i = 0; i < vctxt->nbIdcNodes; i++) { in xmlSchemaClearValidCtxt()
27647 item = vctxt->idcNodes[i]; in xmlSchemaClearValidCtxt()
27651 xmlFree(vctxt->idcNodes); in xmlSchemaClearValidCtxt()
27652 vctxt->idcNodes = NULL; in xmlSchemaClearValidCtxt()
27653 vctxt->nbIdcNodes = 0; in xmlSchemaClearValidCtxt()
27654 vctxt->sizeIdcNodes = 0; in xmlSchemaClearValidCtxt()
27657 if (vctxt->idcKeys != NULL) { in xmlSchemaClearValidCtxt()
27659 for (i = 0; i < vctxt->nbIdcKeys; i++) in xmlSchemaClearValidCtxt()
27660 xmlSchemaIDCFreeKey(vctxt->idcKeys[i]); in xmlSchemaClearValidCtxt()
27661 xmlFree(vctxt->idcKeys); in xmlSchemaClearValidCtxt()
27662 vctxt->idcKeys = NULL; in xmlSchemaClearValidCtxt()
27663 vctxt->nbIdcKeys = 0; in xmlSchemaClearValidCtxt()
27664 vctxt->sizeIdcKeys = 0; in xmlSchemaClearValidCtxt()
27670 if (vctxt->xpathStates != NULL) { in xmlSchemaClearValidCtxt()
27671 xmlSchemaFreeIDCStateObjList(vctxt->xpathStates); in xmlSchemaClearValidCtxt()
27672 vctxt->xpathStates = NULL; in xmlSchemaClearValidCtxt()
27677 if (vctxt->nbAttrInfos != 0) { in xmlSchemaClearValidCtxt()
27678 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaClearValidCtxt()
27683 if (vctxt->elemInfos != NULL) { in xmlSchemaClearValidCtxt()
27687 for (i = 0; i < vctxt->sizeElemInfos; i++) { in xmlSchemaClearValidCtxt()
27688 ei = vctxt->elemInfos[i]; in xmlSchemaClearValidCtxt()
27691 xmlSchemaClearElemInfo(vctxt, ei); in xmlSchemaClearValidCtxt()
27694 xmlSchemaItemListClear(vctxt->nodeQNames); in xmlSchemaClearValidCtxt()
27696 xmlDictFree(vctxt->dict); in xmlSchemaClearValidCtxt()
27701 vctxt->dict = xmlDictCreate(); in xmlSchemaClearValidCtxt()
27703 if (vctxt->filename != NULL) { in xmlSchemaClearValidCtxt()
27704 xmlFree(vctxt->filename); in xmlSchemaClearValidCtxt()
27705 vctxt->filename = NULL; in xmlSchemaClearValidCtxt()
27939 xmlSchemaVDocWalk(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVDocWalk() argument
27948 if (vctxt->validationRoot != NULL) in xmlSchemaVDocWalk()
27949 valRoot = vctxt->validationRoot; in xmlSchemaVDocWalk()
27951 valRoot = xmlDocGetRootElement(vctxt->doc); in xmlSchemaVDocWalk()
27957 vctxt->depth = -1; in xmlSchemaVDocWalk()
27958 vctxt->validationRoot = valRoot; in xmlSchemaVDocWalk()
27961 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaVDocWalk()
27968 vctxt->depth++; in xmlSchemaVDocWalk()
27969 if (xmlSchemaValidatorPushElem(vctxt) == -1) in xmlSchemaVDocWalk()
27971 ielem = vctxt->inode; in xmlSchemaVDocWalk()
27983 vctxt->nbAttrInfos = 0; in xmlSchemaVDocWalk()
27991 ret = xmlSchemaValidatorPushAttribute(vctxt, in xmlSchemaVDocWalk()
28011 ret = xmlSchemaValidateElem(vctxt); in xmlSchemaVDocWalk()
28024 if ((vctxt->skipDepth != -1) && in xmlSchemaVDocWalk()
28025 (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaVDocWalk()
28034 ret = xmlSchemaVPushText(vctxt, node->type, node->content, in xmlSchemaVDocWalk()
28074 if (node != vctxt->inode->node) { in xmlSchemaVDocWalk()
28079 ret = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaVDocWalk()
28106 xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaPreRun() argument
28110 vctxt->err = 0; in xmlSchemaPreRun()
28111 vctxt->nberrors = 0; in xmlSchemaPreRun()
28112 vctxt->depth = -1; in xmlSchemaPreRun()
28113 vctxt->skipDepth = -1; in xmlSchemaPreRun()
28114 vctxt->xsiAssemble = 0; in xmlSchemaPreRun()
28115 vctxt->hasKeyrefs = 0; in xmlSchemaPreRun()
28117 vctxt->createIDCNodeTables = 1; in xmlSchemaPreRun()
28119 vctxt->createIDCNodeTables = 0; in xmlSchemaPreRun()
28124 if (vctxt->schema == NULL) { in xmlSchemaPreRun()
28127 vctxt->xsiAssemble = 1; in xmlSchemaPreRun()
28134 if ((vctxt->pctxt == NULL) && in xmlSchemaPreRun()
28135 (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1)) in xmlSchemaPreRun()
28137 pctxt = vctxt->pctxt; in xmlSchemaPreRun()
28142 vctxt->schema = xmlSchemaNewSchema(pctxt); in xmlSchemaPreRun()
28143 if (vctxt->schema == NULL) in xmlSchemaPreRun()
28151 pctxt->constructor->mainSchema = vctxt->schema; in xmlSchemaPreRun()
28161 xmlHashScan(vctxt->schema->schemasImports, xmlSchemaAugmentImportedIDC, in xmlSchemaPreRun()
28162 vctxt); in xmlSchemaPreRun()
28168 xmlSchemaPostRun(xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaPostRun() argument
28169 if (vctxt->xsiAssemble) { in xmlSchemaPostRun()
28170 if (vctxt->schema != NULL) { in xmlSchemaPostRun()
28171 xmlSchemaFree(vctxt->schema); in xmlSchemaPostRun()
28172 vctxt->schema = NULL; in xmlSchemaPostRun()
28175 xmlSchemaClearValidCtxt(vctxt); in xmlSchemaPostRun()
28179 xmlSchemaVStart(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVStart() argument
28183 if (xmlSchemaPreRun(vctxt) < 0) in xmlSchemaVStart()
28186 if (vctxt->doc != NULL) { in xmlSchemaVStart()
28190 ret = xmlSchemaVDocWalk(vctxt); in xmlSchemaVStart()
28192 } else if (vctxt->reader != NULL) { in xmlSchemaVStart()
28197 ret = xmlSchemaVReaderWalk(vctxt); in xmlSchemaVStart()
28200 } else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) { in xmlSchemaVStart()
28204 ret = xmlParseDocument(vctxt->parserCtxt); in xmlSchemaVStart()
28211 xmlSchemaPostRun(vctxt); in xmlSchemaVStart()
28213 ret = vctxt->err; in xmlSchemaVStart()
28804 xmlSchemaValidateSetLocator(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateSetLocator() argument
28808 if (vctxt == NULL) return; in xmlSchemaValidateSetLocator()
28809 vctxt->locFunc = f; in xmlSchemaValidateSetLocator()
28810 vctxt->locCtxt = ctxt; in xmlSchemaValidateSetLocator()