• Home
  • Raw
  • Download

Lines Matching refs:vctxt

623     xmlSchemaValidCtxtPtr vctxt;  member
1069 xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt);
2035 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctxt; in xmlSchemaErr4Line() local
2038 vctxt->nberrors++; in xmlSchemaErr4Line()
2039 vctxt->err = error; in xmlSchemaErr4Line()
2040 channel = vctxt->error; in xmlSchemaErr4Line()
2042 channel = vctxt->warning; in xmlSchemaErr4Line()
2044 schannel = vctxt->serror; in xmlSchemaErr4Line()
2045 data = vctxt->errCtxt; in xmlSchemaErr4Line()
2053 (vctxt->depth >= 0) && in xmlSchemaErr4Line()
2054 (vctxt->inode != NULL)) { in xmlSchemaErr4Line()
2055 node = vctxt->inode->node; in xmlSchemaErr4Line()
2061 (vctxt->parserCtxt != NULL) && in xmlSchemaErr4Line()
2062 (vctxt->parserCtxt->input != NULL)) { in xmlSchemaErr4Line()
2063 file = vctxt->parserCtxt->input->filename; in xmlSchemaErr4Line()
2064 line = vctxt->parserCtxt->input->line; in xmlSchemaErr4Line()
2075 if (vctxt->doc != NULL) in xmlSchemaErr4Line()
2076 file = (const char *) vctxt->doc->URL; in xmlSchemaErr4Line()
2077 else if ((vctxt->parserCtxt != NULL) && in xmlSchemaErr4Line()
2078 (vctxt->parserCtxt->input != NULL)) in xmlSchemaErr4Line()
2079 file = vctxt->parserCtxt->input->filename; in xmlSchemaErr4Line()
2197 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) actxt; in xmlSchemaFormatNodeForError() local
2201 if (vctxt->inode->nodeType == XML_ATTRIBUTE_NODE) { in xmlSchemaFormatNodeForError()
2203 vctxt->elemInfos[vctxt->depth]; in xmlSchemaFormatNodeForError()
2215 vctxt->inode->nsName, vctxt->inode->localName)); in xmlSchemaFormatNodeForError()
2359 xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaKeyrefErr() argument
2372 xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR, in xmlSchemaKeyrefErr()
2375 vctxt->nodeQNames->items[idcNode->nodeQNameID +1], in xmlSchemaKeyrefErr()
2376 vctxt->nodeQNames->items[idcNode->nodeQNameID]), in xmlSchemaKeyrefErr()
2731 xmlSchemaCustomErr(ACTXT_CAST vctxt, err, NULL, type, msg, NULL, NULL);
2733 #define VERROR_INT(func, msg) xmlSchemaInternalErr(ACTXT_CAST vctxt, func, msg);
9967 xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaCreatePCtxtOnVCtxt() argument
9969 if (vctxt->pctxt == NULL) { in xmlSchemaCreatePCtxtOnVCtxt()
9970 if (vctxt->schema != NULL) in xmlSchemaCreatePCtxtOnVCtxt()
9971 vctxt->pctxt = in xmlSchemaCreatePCtxtOnVCtxt()
9972 xmlSchemaNewParserCtxtUseDict("*", vctxt->schema->dict); in xmlSchemaCreatePCtxtOnVCtxt()
9974 vctxt->pctxt = xmlSchemaNewParserCtxt("*"); in xmlSchemaCreatePCtxtOnVCtxt()
9975 if (vctxt->pctxt == NULL) { in xmlSchemaCreatePCtxtOnVCtxt()
9981 xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error, in xmlSchemaCreatePCtxtOnVCtxt()
9982 vctxt->warning, vctxt->errCtxt); in xmlSchemaCreatePCtxtOnVCtxt()
9983 xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror, in xmlSchemaCreatePCtxtOnVCtxt()
9984 vctxt->errCtxt); in xmlSchemaCreatePCtxtOnVCtxt()
12508 if (ctxt->vctxt != NULL) { in xmlSchemaFreeParserCtxt()
12509 xmlSchemaFreeValidCtxt(ctxt->vctxt); in xmlSchemaFreeParserCtxt()
15729 if (ctxt->vctxt == NULL) { in xmlSchemaCreateVCtxtOnPCtxt()
15730 ctxt->vctxt = xmlSchemaNewValidCtxt(NULL); in xmlSchemaCreateVCtxtOnPCtxt()
15731 if (ctxt->vctxt == NULL) { in xmlSchemaCreateVCtxtOnPCtxt()
15740 xmlSchemaSetValidErrors(ctxt->vctxt, in xmlSchemaCreateVCtxtOnPCtxt()
15742 xmlSchemaSetValidStructuredErrors(ctxt->vctxt, in xmlSchemaCreateVCtxtOnPCtxt()
18824 if (pctxt->vctxt == NULL) { in xmlSchemaCheckFacetValues()
18828 pctxt->vctxt->schema = pctxt->schema; in xmlSchemaCheckFacetValues()
18834 pctxt->vctxt->schema = NULL; in xmlSchemaCheckFacetValues()
21397 if (ctxt->vctxt != NULL) in xmlSchemaSetParserErrors()
21398 xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx); in xmlSchemaSetParserErrors()
21418 if (ctxt->vctxt != NULL) in xmlSchemaSetParserStructuredErrors()
21419 xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx); in xmlSchemaSetParserStructuredErrors()
21563 xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaAssembleByLocation() argument
21573 if ((vctxt == NULL) || (schema == NULL)) in xmlSchemaAssembleByLocation()
21576 if (vctxt->pctxt == NULL) { in xmlSchemaAssembleByLocation()
21581 pctxt = vctxt->pctxt; in xmlSchemaAssembleByLocation()
21606 xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC, in xmlSchemaAssembleByLocation()
21654 if ((ret != 0) && (vctxt->err == 0)) in xmlSchemaAssembleByLocation()
21655 vctxt->err = ret; in xmlSchemaAssembleByLocation()
21656 vctxt->nberrors += pctxt->nberrors; in xmlSchemaAssembleByLocation()
21659 vctxt->nberrors += pctxt->nberrors; in xmlSchemaAssembleByLocation()
21669 xmlSchemaGetMetaAttrInfo(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaGetMetaAttrInfo() argument
21672 if (vctxt->nbAttrInfos == 0) in xmlSchemaGetMetaAttrInfo()
21678 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaGetMetaAttrInfo()
21679 iattr = vctxt->attrInfos[i]; in xmlSchemaGetMetaAttrInfo()
21701 xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaAssembleByXSI() argument
21717 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaAssembleByXSI()
21720 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaAssembleByXSI()
21741 nsname = xmlDictLookup(vctxt->schema->dict, cur, end - cur); in xmlSchemaAssembleByXSI()
21760 xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC, in xmlSchemaAssembleByXSI()
21768 location = xmlDictLookup(vctxt->schema->dict, cur, end - cur); in xmlSchemaAssembleByXSI()
21770 ret = xmlSchemaAssembleByLocation(vctxt, vctxt->schema, in xmlSchemaAssembleByXSI()
21782 xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaLookupNamespace() argument
21785 if (vctxt->sax != NULL) { in xmlSchemaLookupNamespace()
21789 for (i = vctxt->depth; i >= 0; i--) { in xmlSchemaLookupNamespace()
21790 if (vctxt->elemInfos[i]->nbNsBindings != 0) { in xmlSchemaLookupNamespace()
21791 inode = vctxt->elemInfos[i]; in xmlSchemaLookupNamespace()
21809 } else if (vctxt->reader != NULL) { in xmlSchemaLookupNamespace()
21812 nsName = xmlTextReaderLookupNamespace(vctxt->reader, prefix); in xmlSchemaLookupNamespace()
21816 ret = xmlDictLookup(vctxt->dict, nsName, -1); in xmlSchemaLookupNamespace()
21825 if ((vctxt->inode->node == NULL) || in xmlSchemaLookupNamespace()
21826 (vctxt->inode->node->doc == NULL)) { in xmlSchemaLookupNamespace()
21831 ns = xmlSearchNs(vctxt->inode->node->doc, in xmlSchemaLookupNamespace()
21832 vctxt->inode->node, prefix); in xmlSchemaLookupNamespace()
21843 xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateNotation() argument
21852 if (vctxt && (vctxt->schema == NULL)) { in xmlSchemaValidateNotation()
21868 if (vctxt != NULL) in xmlSchemaValidateNotation()
21869 nsName = xmlSchemaLookupNamespace(vctxt, BAD_CAST prefix); in xmlSchemaValidateNotation()
21911 xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVAddNodeQName() argument
21917 lname = xmlDictLookup(vctxt->dict, lname, -1); in xmlSchemaVAddNodeQName()
21921 nsname = xmlDictLookup(vctxt->dict, nsname, -1); in xmlSchemaVAddNodeQName()
21925 for (i = 0; i < vctxt->nodeQNames->nbItems; i += 2) { in xmlSchemaVAddNodeQName()
21926 if ((vctxt->nodeQNames->items [i] == lname) && in xmlSchemaVAddNodeQName()
21927 (vctxt->nodeQNames->items[i +1] == nsname)) in xmlSchemaVAddNodeQName()
21932 i = vctxt->nodeQNames->nbItems; in xmlSchemaVAddNodeQName()
21933 xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) lname); in xmlSchemaVAddNodeQName()
21934 xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) nsname); in xmlSchemaVAddNodeQName()
21954 xmlSchemaValidCtxtPtr vctxt) in xmlSchemaAugmentIDC() argument
21960 xmlSchemaVErrMemory(vctxt, in xmlSchemaAugmentIDC()
21968 if (vctxt->aidcs == NULL) in xmlSchemaAugmentIDC()
21969 vctxt->aidcs = aidc; in xmlSchemaAugmentIDC()
21971 aidc->next = vctxt->aidcs; in xmlSchemaAugmentIDC()
21972 vctxt->aidcs = aidc; in xmlSchemaAugmentIDC()
21977 if ((vctxt->hasKeyrefs == 0) && in xmlSchemaAugmentIDC()
21979 vctxt->hasKeyrefs = 1; in xmlSchemaAugmentIDC()
21989 xmlSchemaAugmentImportedIDC(xmlSchemaImportPtr imported, xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaAugmentImportedIDC() argument
21992 (xmlHashScanner) xmlSchemaAugmentIDC, vctxt); in xmlSchemaAugmentImportedIDC()
22033 xmlSchemaIDCStoreNodeTableItem(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCStoreNodeTableItem() argument
22039 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22040 vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) in xmlSchemaIDCStoreNodeTableItem()
22042 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22043 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreNodeTableItem()
22047 vctxt->sizeIdcNodes = 20; in xmlSchemaIDCStoreNodeTableItem()
22048 } else if (vctxt->sizeIdcNodes <= vctxt->nbIdcNodes) { in xmlSchemaIDCStoreNodeTableItem()
22049 vctxt->sizeIdcNodes *= 2; in xmlSchemaIDCStoreNodeTableItem()
22050 vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) in xmlSchemaIDCStoreNodeTableItem()
22051 xmlRealloc(vctxt->idcNodes, vctxt->sizeIdcNodes * in xmlSchemaIDCStoreNodeTableItem()
22053 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22054 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreNodeTableItem()
22059 vctxt->idcNodes[vctxt->nbIdcNodes++] = item; in xmlSchemaIDCStoreNodeTableItem()
22074 xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCStoreKey() argument
22080 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22081 vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) in xmlSchemaIDCStoreKey()
22083 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22084 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreKey()
22088 vctxt->sizeIdcKeys = 40; in xmlSchemaIDCStoreKey()
22089 } else if (vctxt->sizeIdcKeys <= vctxt->nbIdcKeys) { in xmlSchemaIDCStoreKey()
22090 vctxt->sizeIdcKeys *= 2; in xmlSchemaIDCStoreKey()
22091 vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) in xmlSchemaIDCStoreKey()
22092 xmlRealloc(vctxt->idcKeys, vctxt->sizeIdcKeys * in xmlSchemaIDCStoreKey()
22094 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22095 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreKey()
22100 vctxt->idcKeys[vctxt->nbIdcKeys++] = key; in xmlSchemaIDCStoreKey()
22154 xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCAcquireBinding() argument
22159 ielem = vctxt->elemInfos[matcher->depth]; in xmlSchemaIDCAcquireBinding()
22186 xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, in xmlSchemaIDCAcquireTargetList()
22293 xmlSchemaIDCReleaseMatcherList(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCReleaseMatcherList() argument
22334 if (vctxt->idcMatcherCache != NULL) in xmlSchemaIDCReleaseMatcherList()
22335 matcher->nextCached = vctxt->idcMatcherCache; in xmlSchemaIDCReleaseMatcherList()
22336 vctxt->idcMatcherCache = matcher; in xmlSchemaIDCReleaseMatcherList()
22357 xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCAddStateObject() argument
22367 if (vctxt->xpathStatePool != NULL) { in xmlSchemaIDCAddStateObject()
22368 sto = vctxt->xpathStatePool; in xmlSchemaIDCAddStateObject()
22369 vctxt->xpathStatePool = sto->next; in xmlSchemaIDCAddStateObject()
22386 if (vctxt->xpathStates != NULL) in xmlSchemaIDCAddStateObject()
22387 sto->next = vctxt->xpathStates; in xmlSchemaIDCAddStateObject()
22388 vctxt->xpathStates = sto; in xmlSchemaIDCAddStateObject()
22407 sto->depth = vctxt->depth; in xmlSchemaIDCAddStateObject()
22430 xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaXPathEvaluate() argument
22434 int res, resolved = 0, depth = vctxt->depth; in xmlSchemaXPathEvaluate()
22436 if (vctxt->xpathStates == NULL) in xmlSchemaXPathEvaluate()
22446 xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaXPathEvaluate()
22447 vctxt->inode->localName), depth, nodeType); in xmlSchemaXPathEvaluate()
22454 first = vctxt->xpathStates; in xmlSchemaXPathEvaluate()
22467 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathEvaluate()
22470 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathEvaluate()
22511 vctxt->depth); in xmlSchemaXPathEvaluate()
22526 if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher, in xmlSchemaXPathEvaluate()
22544 if ((vctxt->inode->flags & in xmlSchemaXPathEvaluate()
22546 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; in xmlSchemaXPathEvaluate()
22556 sto = vctxt->xpathStates; in xmlSchemaXPathEvaluate()
22564 xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaFormatIDCKeySequence() argument
22608 xmlSchemaXPathPop(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaXPathPop() argument
22613 if (vctxt->xpathStates == NULL) in xmlSchemaXPathPop()
22615 sto = vctxt->xpathStates; in xmlSchemaXPathPop()
22637 xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaXPathProcessHistory() argument
22643 xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL; in xmlSchemaXPathProcessHistory()
22645 if (vctxt->xpathStates == NULL) in xmlSchemaXPathProcessHistory()
22647 sto = vctxt->xpathStates; in xmlSchemaXPathProcessHistory()
22654 xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaXPathProcessHistory()
22655 vctxt->inode->localName), vctxt->depth); in xmlSchemaXPathProcessHistory()
22715 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
22727 if ((key == NULL) && (vctxt->inode->val == NULL)) { in xmlSchemaXPathProcessHistory()
22824 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
22870 key->val = vctxt->inode->val; in xmlSchemaXPathProcessHistory()
22871 vctxt->inode->val = NULL; in xmlSchemaXPathProcessHistory()
22875 if (xmlSchemaIDCStoreKey(vctxt, key) == -1) { in xmlSchemaXPathProcessHistory()
22954 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); in xmlSchemaXPathProcessHistory()
22956 targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher); in xmlSchemaXPathProcessHistory()
22996 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
23000 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaXPathProcessHistory()
23026 if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) { in xmlSchemaXPathProcessHistory()
23038 ntItem->nodeQNameID = xmlSchemaVAddNodeQName(vctxt, in xmlSchemaXPathProcessHistory()
23039 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathProcessHistory()
23051 ntItem->node = vctxt->node; in xmlSchemaXPathProcessHistory()
23052 ntItem->nodeLine = vctxt->inode->nodeLine; in xmlSchemaXPathProcessHistory()
23080 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
23108 if (vctxt->xpathStates != sto) { in xmlSchemaXPathProcessHistory()
23117 vctxt->xpathStates = sto->next; in xmlSchemaXPathProcessHistory()
23118 sto->next = vctxt->xpathStatePool; in xmlSchemaXPathProcessHistory()
23122 vctxt->xpathStatePool = sto; in xmlSchemaXPathProcessHistory()
23141 xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCRegisterMatchers() argument
23157 (char *) xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaIDCRegisterMatchers()
23158 vctxt->inode->localName), vctxt->depth); in xmlSchemaIDCRegisterMatchers()
23162 if (vctxt->inode->idcMatchers != NULL) { in xmlSchemaIDCRegisterMatchers()
23181 vctxt->inode->hasKeyrefs = 1; in xmlSchemaIDCRegisterMatchers()
23185 aidc = vctxt->aidcs; in xmlSchemaIDCRegisterMatchers()
23198 (vctxt->depth < aidc->keyrefDepth)) in xmlSchemaIDCRegisterMatchers()
23199 aidc->keyrefDepth = vctxt->depth; in xmlSchemaIDCRegisterMatchers()
23205 aidc = vctxt->aidcs; in xmlSchemaIDCRegisterMatchers()
23219 if (vctxt->idcMatcherCache != NULL) { in xmlSchemaIDCRegisterMatchers()
23223 matcher = vctxt->idcMatcherCache; in xmlSchemaIDCRegisterMatchers()
23224 vctxt->idcMatcherCache = matcher->nextCached; in xmlSchemaIDCRegisterMatchers()
23230 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCRegisterMatchers()
23237 vctxt->inode->idcMatchers = matcher; in xmlSchemaIDCRegisterMatchers()
23243 matcher->depth = vctxt->depth; in xmlSchemaIDCRegisterMatchers()
23252 if (xmlSchemaIDCAddStateObject(vctxt, matcher, in xmlSchemaIDCRegisterMatchers()
23262 xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCFillNodeTables() argument
23286 if ((! vctxt->createIDCNodeTables) && in xmlSchemaIDCFillNodeTables()
23288 (matcher->aidc->keyrefDepth > vctxt->depth))) in xmlSchemaIDCFillNodeTables()
23296 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); in xmlSchemaIDCFillNodeTables()
23458 xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaBubbleIDCNodeTables() argument
23466 bind = vctxt->inode->idcTable; in xmlSchemaBubbleIDCNodeTables()
23472 parTable = &(vctxt->elemInfos[vctxt->depth -1]->idcTable); in xmlSchemaBubbleIDCNodeTables()
23484 if (! vctxt->createIDCNodeTables) { in xmlSchemaBubbleIDCNodeTables()
23485 aidc = vctxt->aidcs; in xmlSchemaBubbleIDCNodeTables()
23489 (aidc->keyrefDepth >= vctxt->depth)) { in xmlSchemaBubbleIDCNodeTables()
23684 if (! vctxt->psviExposeIDCNodeTables) { in xmlSchemaBubbleIDCNodeTables()
23753 xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaCheckCVCIDCKeyRef() argument
23758 matcher = vctxt->inode->idcMatchers; in xmlSchemaCheckCVCIDCKeyRef()
23776 bind = vctxt->inode->idcTable; in xmlSchemaCheckCVCIDCKeyRef()
23831 xmlSchemaKeyrefErr(vctxt, in xmlSchemaCheckCVCIDCKeyRef()
23836 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaCheckCVCIDCKeyRef()
23850 xmlSchemaKeyrefErr(vctxt, in xmlSchemaCheckCVCIDCKeyRef()
23854 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaCheckCVCIDCKeyRef()
23875 xmlSchemaGetFreshAttrInfo(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaGetFreshAttrInfo() argument
23881 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23882 vctxt->attrInfos = (xmlSchemaAttrInfoPtr *) in xmlSchemaGetFreshAttrInfo()
23884 vctxt->sizeAttrInfos = 1; in xmlSchemaGetFreshAttrInfo()
23885 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23886 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshAttrInfo()
23890 } else if (vctxt->sizeAttrInfos <= vctxt->nbAttrInfos) { in xmlSchemaGetFreshAttrInfo()
23891 vctxt->sizeAttrInfos++; in xmlSchemaGetFreshAttrInfo()
23892 vctxt->attrInfos = (xmlSchemaAttrInfoPtr *) in xmlSchemaGetFreshAttrInfo()
23893 xmlRealloc(vctxt->attrInfos, in xmlSchemaGetFreshAttrInfo()
23894 vctxt->sizeAttrInfos * sizeof(xmlSchemaAttrInfoPtr)); in xmlSchemaGetFreshAttrInfo()
23895 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23896 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshAttrInfo()
23901 iattr = vctxt->attrInfos[vctxt->nbAttrInfos++]; in xmlSchemaGetFreshAttrInfo()
23916 xmlSchemaVErrMemory(vctxt, "creating new attribute info", NULL); in xmlSchemaGetFreshAttrInfo()
23921 vctxt->attrInfos[vctxt->nbAttrInfos++] = iattr; in xmlSchemaGetFreshAttrInfo()
23927 xmlSchemaValidatorPushAttribute(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidatorPushAttribute() argument
23938 attr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaValidatorPushAttribute()
23989 xmlSchemaClearElemInfo(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaClearElemInfo() argument
24019 xmlSchemaIDCReleaseMatcherList(vctxt, ielem->idcMatchers); in xmlSchemaClearElemInfo()
24054 xmlSchemaGetFreshElemInfo(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaGetFreshElemInfo() argument
24058 if (vctxt->depth > vctxt->sizeElemInfos) { in xmlSchemaGetFreshElemInfo()
24063 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24064 vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) in xmlSchemaGetFreshElemInfo()
24066 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24067 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24071 memset(vctxt->elemInfos, 0, 10 * sizeof(xmlSchemaNodeInfoPtr)); in xmlSchemaGetFreshElemInfo()
24072 vctxt->sizeElemInfos = 10; in xmlSchemaGetFreshElemInfo()
24073 } else if (vctxt->sizeElemInfos <= vctxt->depth) { in xmlSchemaGetFreshElemInfo()
24074 int i = vctxt->sizeElemInfos; in xmlSchemaGetFreshElemInfo()
24076 vctxt->sizeElemInfos *= 2; in xmlSchemaGetFreshElemInfo()
24077 vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) in xmlSchemaGetFreshElemInfo()
24078 xmlRealloc(vctxt->elemInfos, vctxt->sizeElemInfos * in xmlSchemaGetFreshElemInfo()
24080 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24081 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24089 for (; i < vctxt->sizeElemInfos; i++) in xmlSchemaGetFreshElemInfo()
24090 vctxt->elemInfos[i] = NULL; in xmlSchemaGetFreshElemInfo()
24092 info = vctxt->elemInfos[vctxt->depth]; in xmlSchemaGetFreshElemInfo()
24098 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24102 vctxt->elemInfos[vctxt->depth] = info; in xmlSchemaGetFreshElemInfo()
24112 info->depth = vctxt->depth; in xmlSchemaGetFreshElemInfo()
24117 #define ACTIVATE_ATTRIBUTE(item) vctxt->inode = (xmlSchemaNodeInfoPtr) item;
24118 #define ACTIVATE_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth];
24119 #define ACTIVATE_PARENT_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth -1];
24371 xmlSchemaValidateQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateQName() argument
24401 nsName = xmlSchemaLookupNamespace(vctxt, prefix); in xmlSchemaValidateQName()
24411 xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL, in xmlSchemaValidateQName()
24779 xmlSchemaVExpandQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVExpandQName() argument
24795 xmlSchemaSimpleTypeErr(ACTXT_CAST vctxt, in xmlSchemaVExpandQName()
24810 *localName = xmlDictLookup(vctxt->dict, value, -1); in xmlSchemaVExpandQName()
24812 *localName = xmlDictLookup(vctxt->dict, local, -1); in xmlSchemaVExpandQName()
24816 *nsName = xmlSchemaLookupNamespace(vctxt, prefix); in xmlSchemaVExpandQName()
24824 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVExpandQName()
24838 xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaProcessXSIType() argument
24867 ret = xmlSchemaVExpandQName(vctxt, iattr->value, in xmlSchemaProcessXSIType()
24882 *localType = xmlSchemaGetType(vctxt->schema, local, nsName); in xmlSchemaProcessXSIType()
24886 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaProcessXSIType()
24893 ret = vctxt->err; in xmlSchemaProcessXSIType()
24940 if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType, in xmlSchemaProcessXSIType()
24944 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaProcessXSIType()
24954 ret = vctxt->err; in xmlSchemaProcessXSIType()
24968 xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateElemDecl() argument
24970 xmlSchemaElementPtr elemDecl = vctxt->inode->decl; in xmlSchemaValidateElemDecl()
24979 return (vctxt->err); in xmlSchemaValidateElemDecl()
24988 return (vctxt->err); in xmlSchemaValidateElemDecl()
24995 if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElemDecl()
25002 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemDecl()
25010 ACTXT_CAST vctxt, NULL, in xmlSchemaValidateElemDecl()
25041 vctxt->inode->flags |= in xmlSchemaValidateElemDecl()
25051 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemDecl()
25056 ret = xmlSchemaProcessXSIType(vctxt, iattr, &localType, in xmlSchemaValidateElemDecl()
25068 vctxt->inode->flags |= XML_SCHEMA_ELEM_INFO_LOCAL_TYPE; in xmlSchemaValidateElemDecl()
25077 (xmlSchemaIDCRegisterMatchers(vctxt, elemDecl) == -1)) in xmlSchemaValidateElemDecl()
25090 vctxt->inode->typeDef = actualType; in xmlSchemaValidateElemDecl()
25096 xmlSchemaVAttributesSimple(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVAttributesSimple() argument
25108 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesSimple()
25110 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesSimple()
25111 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesSimple()
25114 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesSimple()
25127 xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaClearAttrInfos() argument
25132 if (vctxt->nbAttrInfos == 0) in xmlSchemaClearAttrInfos()
25134 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaClearAttrInfos()
25135 attr = vctxt->attrInfos[i]; in xmlSchemaClearAttrInfos()
25152 vctxt->nbAttrInfos = 0; in xmlSchemaClearAttrInfos()
25166 xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVAttributesComplex() argument
25168 xmlSchemaTypePtr type = vctxt->inode->typeDef; in xmlSchemaVAttributesComplex()
25200 nbAttrs = vctxt->nbAttrInfos; in xmlSchemaVAttributesComplex()
25210 iattr = vctxt->attrInfos[j]; in xmlSchemaVAttributesComplex()
25263 tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaVAttributesComplex()
25279 tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaVAttributesComplex()
25295 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesComplex()
25306 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25349 iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, in xmlSchemaVAttributesComplex()
25415 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesComplex()
25422 if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { in xmlSchemaVAttributesComplex()
25423 xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth]; in xmlSchemaVAttributesComplex()
25430 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesComplex()
25431 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25452 if (vctxt->xpathStates != NULL) { in xmlSchemaVAttributesComplex()
25456 xpathRes = xmlSchemaXPathEvaluate(vctxt, in xmlSchemaVAttributesComplex()
25551 ns = xmlNewNs(vctxt->validationRoot, in xmlSchemaVAttributesComplex()
25573 if (vctxt->value != NULL) { in xmlSchemaVAttributesComplex()
25577 xmlSchemaFreeValue(vctxt->value); in xmlSchemaVAttributesComplex()
25578 vctxt->value = NULL; in xmlSchemaVAttributesComplex()
25605 ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25610 ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25692 if (xmlSchemaXPathProcessHistory(vctxt, in xmlSchemaVAttributesComplex()
25693 vctxt->depth +1) == -1) { in xmlSchemaVAttributesComplex()
25698 } else if (vctxt->xpathStates != NULL) in xmlSchemaVAttributesComplex()
25699 xmlSchemaXPathPop(vctxt); in xmlSchemaVAttributesComplex()
25705 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesComplex()
25706 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25717 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25732 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25751 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25754 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25771 xmlSchemaValidateElemWildcard(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateElemWildcard() argument
25774 xmlSchemaWildcardPtr wild = (xmlSchemaWildcardPtr) vctxt->inode->decl; in xmlSchemaValidateElemWildcard()
25797 decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateElemWildcard()
25798 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaValidateElemWildcard()
25800 vctxt->inode->decl = decl; in xmlSchemaValidateElemWildcard()
25809 return (vctxt->err); in xmlSchemaValidateElemWildcard()
25811 if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElemWildcard()
25819 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemWildcard()
25822 if (xmlSchemaProcessXSIType(vctxt, iattr, in xmlSchemaValidateElemWildcard()
25823 &(vctxt->inode->typeDef), NULL) == -1) { in xmlSchemaValidateElemWildcard()
25840 vctxt->inode->typeDef = in xmlSchemaValidateElemWildcard()
25853 xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaCheckCOSValidDefault() argument
25858 xmlSchemaNodeInfoPtr inode = vctxt->inode; in xmlSchemaCheckCOSValidDefault()
25901 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, in xmlSchemaCheckCOSValidDefault()
25906 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, in xmlSchemaCheckCOSValidDefault()
25917 xmlSchemaVContentModelCallback(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, in xmlSchemaVContentModelCallback()
25945 xmlSchemaValidatorPushElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidatorPushElem() argument
25947 vctxt->inode = xmlSchemaGetFreshElemInfo(vctxt); in xmlSchemaValidatorPushElem()
25948 if (vctxt->inode == NULL) { in xmlSchemaValidatorPushElem()
25953 vctxt->nbAttrInfos = 0; in xmlSchemaValidatorPushElem()
25958 xmlSchemaVCheckINodeDataType(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVCheckINodeDataType() argument
25965 ACTXT_CAST vctxt, NULL, in xmlSchemaVCheckINodeDataType()
25969 ACTXT_CAST vctxt, NULL, in xmlSchemaVCheckINodeDataType()
25979 xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidatorPopElem() argument
25982 xmlSchemaNodeInfoPtr inode = vctxt->inode; in xmlSchemaValidatorPopElem()
25984 if (vctxt->nbAttrInfos != 0) in xmlSchemaValidatorPopElem()
25985 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaValidatorPopElem()
25992 vctxt->skipDepth = vctxt->depth -1; in xmlSchemaValidatorPopElem()
26027 vctxt); in xmlSchemaValidatorPopElem()
26052 xmlSchemaComplexTypeErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26080 if (vctxt->value != NULL) { in xmlSchemaValidatorPopElem()
26081 xmlSchemaFreeValue(vctxt->value); in xmlSchemaValidatorPopElem()
26082 vctxt->value = NULL; in xmlSchemaValidatorPopElem()
26092 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26095 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26134 ret = xmlSchemaCheckCOSValidDefault(vctxt, in xmlSchemaValidatorPopElem()
26159 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26162 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26179 if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) && in xmlSchemaValidatorPopElem()
26216 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26231 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26287 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26310 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26324 if (vctxt->depth < 0) { in xmlSchemaValidatorPopElem()
26328 if (vctxt->depth == vctxt->skipDepth) in xmlSchemaValidatorPopElem()
26329 vctxt->skipDepth = -1; in xmlSchemaValidatorPopElem()
26334 (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1)) in xmlSchemaValidatorPopElem()
26353 (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) in xmlSchemaValidatorPopElem()
26355 if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1) in xmlSchemaValidatorPopElem()
26361 if (vctxt->inode->hasKeyrefs) in xmlSchemaValidatorPopElem()
26362 if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) in xmlSchemaValidatorPopElem()
26374 if ((vctxt->depth > 0) && in xmlSchemaValidatorPopElem()
26375 (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) in xmlSchemaValidatorPopElem()
26380 if (xmlSchemaBubbleIDCNodeTables(vctxt) == -1) in xmlSchemaValidatorPopElem()
26389 xmlSchemaClearElemInfo(vctxt, inode); in xmlSchemaValidatorPopElem()
26393 if (vctxt->depth == 0) { in xmlSchemaValidatorPopElem()
26394 vctxt->depth--; in xmlSchemaValidatorPopElem()
26395 vctxt->inode = NULL; in xmlSchemaValidatorPopElem()
26401 if (vctxt->aidcs != NULL) { in xmlSchemaValidatorPopElem()
26402 xmlSchemaIDCAugPtr aidc = vctxt->aidcs; in xmlSchemaValidatorPopElem()
26404 if (aidc->keyrefDepth == vctxt->depth) { in xmlSchemaValidatorPopElem()
26415 vctxt->depth--; in xmlSchemaValidatorPopElem()
26416 vctxt->inode = vctxt->elemInfos[vctxt->depth]; in xmlSchemaValidatorPopElem()
26424 vctxt->err = -1; in xmlSchemaValidatorPopElem()
26433 xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateChildElem() argument
26439 if (vctxt->depth <= 0) { in xmlSchemaValidateChildElem()
26444 pielem = vctxt->elemInfos[vctxt->depth -1]; in xmlSchemaValidateChildElem()
26471 vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateChildElem()
26472 vctxt->inode->localName, in xmlSchemaValidateChildElem()
26473 vctxt->inode->nsName); in xmlSchemaValidateChildElem()
26475 if (vctxt->inode->decl == NULL) { in xmlSchemaValidateChildElem()
26481 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateChildElem()
26484 ret = xmlSchemaProcessXSIType(vctxt, iattr, in xmlSchemaValidateChildElem()
26485 &(vctxt->inode->typeDef), NULL); in xmlSchemaValidateChildElem()
26506 vctxt->inode->typeDef = in xmlSchemaValidateChildElem()
26559 vctxt); in xmlSchemaValidateChildElem()
26581 vctxt->inode->localName, in xmlSchemaValidateChildElem()
26582 vctxt->inode->nsName, in xmlSchemaValidateChildElem()
26583 vctxt->inode); in xmlSchemaValidateChildElem()
26588 vctxt->inode->localName, pielem->localName); in xmlSchemaValidateChildElem()
26592 vctxt->inode->localName, pielem->localName); in xmlSchemaValidateChildElem()
26594 if (vctxt->err == XML_SCHEMAV_INTERNAL) { in xmlSchemaValidateChildElem()
26602 xmlSchemaComplexTypeErr(ACTXT_CAST vctxt, in xmlSchemaValidateChildElem()
26606 ret = vctxt->err; in xmlSchemaValidateChildElem()
26635 ret = vctxt->err; in xmlSchemaValidateChildElem()
26648 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateChildElem()
26649 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_NOT_EXPECTED; in xmlSchemaValidateChildElem()
26659 xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVPushText() argument
26674 if (INODE_NILLED(vctxt->inode)) { in xmlSchemaVPushText()
26683 return (vctxt->err); in xmlSchemaVPushText()
26690 if (vctxt->inode->typeDef->contentType == in xmlSchemaVPushText()
26695 return (vctxt->err); in xmlSchemaVPushText()
26698 if (vctxt->inode->typeDef->contentType == in xmlSchemaVPushText()
26713 return (vctxt->err); in xmlSchemaVPushText()
26725 if ((vctxt->inode->typeDef->contentType == XML_SCHEMA_CONTENT_MIXED) && in xmlSchemaVPushText()
26726 ((vctxt->inode->decl == NULL) || in xmlSchemaVPushText()
26727 (vctxt->inode->decl->value == NULL))) in xmlSchemaVPushText()
26730 if (vctxt->inode->value == NULL) { in xmlSchemaVPushText()
26739 vctxt->inode->value = value; in xmlSchemaVPushText()
26746 vctxt->inode->value = value; in xmlSchemaVPushText()
26749 vctxt->inode->flags |= in xmlSchemaVPushText()
26758 vctxt->inode->value = BAD_CAST xmlStrndup(value, len); in xmlSchemaVPushText()
26760 vctxt->inode->value = BAD_CAST xmlStrdup(value); in xmlSchemaVPushText()
26761 vctxt->inode->flags |= in xmlSchemaVPushText()
26773 if (vctxt->inode->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES) { in xmlSchemaVPushText()
26774 vctxt->inode->value = BAD_CAST xmlStrncat( in xmlSchemaVPushText()
26775 (xmlChar *) vctxt->inode->value, value, len); in xmlSchemaVPushText()
26777 vctxt->inode->value = in xmlSchemaVPushText()
26778 BAD_CAST xmlStrncatNew(vctxt->inode->value, value, len); in xmlSchemaVPushText()
26779 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES; in xmlSchemaVPushText()
26787 xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateElem() argument
26791 if ((vctxt->skipDepth != -1) && in xmlSchemaValidateElem()
26792 (vctxt->depth >= vctxt->skipDepth)) { in xmlSchemaValidateElem()
26797 if (vctxt->xsiAssemble) { in xmlSchemaValidateElem()
26808 ret = xmlSchemaAssembleByXSI(vctxt); in xmlSchemaValidateElem()
26812 vctxt->skipDepth = 0; in xmlSchemaValidateElem()
26819 … xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt); in xmlSchemaValidateElem()
26821 if (vctxt->depth > 0) { in xmlSchemaValidateElem()
26826 ret = xmlSchemaValidateChildElem(vctxt); in xmlSchemaValidateElem()
26835 if (vctxt->depth == vctxt->skipDepth) in xmlSchemaValidateElem()
26837 if ((vctxt->inode->decl == NULL) && in xmlSchemaValidateElem()
26838 (vctxt->inode->typeDef == NULL)) { in xmlSchemaValidateElem()
26848 vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateElem()
26849 vctxt->inode->localName, in xmlSchemaValidateElem()
26850 vctxt->inode->nsName); in xmlSchemaValidateElem()
26851 if (vctxt->inode->decl == NULL) { in xmlSchemaValidateElem()
26860 if (vctxt->inode->decl == NULL) in xmlSchemaValidateElem()
26863 if (vctxt->inode->decl->type == XML_SCHEMA_TYPE_ANY) { in xmlSchemaValidateElem()
26868 ret = xmlSchemaValidateElemWildcard(vctxt, &skip); in xmlSchemaValidateElem()
26878 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateElem()
26885 if (vctxt->inode->decl->type != XML_SCHEMA_TYPE_ELEMENT) { in xmlSchemaValidateElem()
26889 vctxt->inode->decl = NULL; in xmlSchemaValidateElem()
26896 ret = xmlSchemaValidateElemDecl(vctxt); in xmlSchemaValidateElem()
26910 if (vctxt->inode->typeDef == NULL) { in xmlSchemaValidateElem()
26911 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE; in xmlSchemaValidateElem()
26917 if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) { in xmlSchemaValidateElem()
26918 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE; in xmlSchemaValidateElem()
26929 if (vctxt->xpathStates != NULL) { in xmlSchemaValidateElem()
26930 ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE); in xmlSchemaValidateElem()
26931 vctxt->inode->appliedXPath = 1; in xmlSchemaValidateElem()
26941 if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) { in xmlSchemaValidateElem()
26942 if ((vctxt->nbAttrInfos != 0) || in xmlSchemaValidateElem()
26943 (vctxt->inode->typeDef->attrUses != NULL)) { in xmlSchemaValidateElem()
26945 ret = xmlSchemaVAttributesComplex(vctxt); in xmlSchemaValidateElem()
26947 } else if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElem()
26949 ret = xmlSchemaVAttributesSimple(vctxt); in xmlSchemaValidateElem()
26954 if (vctxt->nbAttrInfos != 0) in xmlSchemaValidateElem()
26955 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaValidateElem()
26968 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateElem()
26976 xmlSchemaVReaderWalk(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVReaderWalk() argument
26982 vctxt->depth = -1; in xmlSchemaVReaderWalk()
26983 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
26988 nodeType = xmlTextReaderNodeType(vctxt->reader); in xmlSchemaVReaderWalk()
26991 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
26998 depth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
26999 nodeType = xmlTextReaderNodeType(vctxt->reader); in xmlSchemaVReaderWalk()
27003 vctxt->depth++; in xmlSchemaVReaderWalk()
27004 if (xmlSchemaValidatorPushElem(vctxt) == -1) { in xmlSchemaVReaderWalk()
27009 ielem = vctxt->inode; in xmlSchemaVReaderWalk()
27010 ielem->localName = xmlTextReaderLocalName(vctxt->reader); in xmlSchemaVReaderWalk()
27011 ielem->nsName = xmlTextReaderNamespaceUri(vctxt->reader); in xmlSchemaVReaderWalk()
27016 ret = xmlTextReaderIsEmptyElement(vctxt->reader); in xmlSchemaVReaderWalk()
27028 vctxt->nbAttrInfos = 0; in xmlSchemaVReaderWalk()
27029 ret = xmlTextReaderMoveToFirstAttribute(vctxt->reader); in xmlSchemaVReaderWalk()
27041 if (xmlSchemaValidatorPushAttribute(vctxt, NULL, in xmlSchemaVReaderWalk()
27042 (const xmlChar *) xmlTextReaderLocalName(vctxt->reader), in xmlSchemaVReaderWalk()
27043 xmlTextReaderNamespaceUri(vctxt->reader), 1, in xmlSchemaVReaderWalk()
27044 xmlTextReaderValue(vctxt->reader), 1) == -1) { in xmlSchemaVReaderWalk()
27050 ret = xmlTextReaderMoveToNextAttribute(vctxt->reader); in xmlSchemaVReaderWalk()
27060 ret = xmlTextReaderMoveToElement(vctxt->reader); in xmlSchemaVReaderWalk()
27070 ret= xmlSchemaValidateElem(vctxt); in xmlSchemaVReaderWalk()
27079 if (vctxt->depth == vctxt->skipDepth) { in xmlSchemaVReaderWalk()
27085 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27086 curDepth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27088 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27089 curDepth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27112 ret = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaVReaderWalk()
27121 if (vctxt->depth >= 0) in xmlSchemaVReaderWalk()
27122 ielem = vctxt->inode; in xmlSchemaVReaderWalk()
27137 value = xmlTextReaderValue(vctxt->reader); in xmlSchemaVReaderWalk()
27138 ret = xmlSchemaVPushText(vctxt, nodeType, BAD_CAST value, in xmlSchemaVReaderWalk()
27157 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27181 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleText() local
27183 if (vctxt->depth < 0) in xmlSchemaSAXHandleText()
27185 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleText()
27187 if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) in xmlSchemaSAXHandleText()
27188 vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY; in xmlSchemaSAXHandleText()
27189 if (xmlSchemaVPushText(vctxt, XML_TEXT_NODE, ch, len, in xmlSchemaSAXHandleText()
27193 vctxt->err = -1; in xmlSchemaSAXHandleText()
27194 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleText()
27206 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleCDataSection() local
27208 if (vctxt->depth < 0) in xmlSchemaSAXHandleCDataSection()
27210 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleCDataSection()
27212 if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) in xmlSchemaSAXHandleCDataSection()
27213 vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY; in xmlSchemaSAXHandleCDataSection()
27214 if (xmlSchemaVPushText(vctxt, XML_CDATA_SECTION_NODE, ch, len, in xmlSchemaSAXHandleCDataSection()
27218 vctxt->err = -1; in xmlSchemaSAXHandleCDataSection()
27219 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleCDataSection()
27227 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleReference() local
27229 if (vctxt->depth < 0) in xmlSchemaSAXHandleReference()
27231 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleReference()
27248 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleStartElementNs() local
27259 vctxt->depth++; in xmlSchemaSAXHandleStartElementNs()
27260 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleStartElementNs()
27265 if (xmlSchemaValidatorPushElem(vctxt) == -1) { in xmlSchemaSAXHandleStartElementNs()
27270 ielem = vctxt->inode; in xmlSchemaSAXHandleStartElementNs()
27274 ielem->nodeLine = xmlSAX2GetLineNumber(vctxt->parserCtxt); in xmlSchemaSAXHandleStartElementNs()
27295 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27309 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27345 ret = xmlSchemaValidatorPushAttribute(vctxt, in xmlSchemaSAXHandleStartElementNs()
27358 ret = xmlSchemaValidateElem(vctxt); in xmlSchemaSAXHandleStartElementNs()
27371 vctxt->err = -1; in xmlSchemaSAXHandleStartElementNs()
27372 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleStartElementNs()
27382 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleEndElementNs() local
27388 if (vctxt->skipDepth != -1) { in xmlSchemaSAXHandleEndElementNs()
27389 if (vctxt->depth > vctxt->skipDepth) { in xmlSchemaSAXHandleEndElementNs()
27390 vctxt->depth--; in xmlSchemaSAXHandleEndElementNs()
27393 vctxt->skipDepth = -1; in xmlSchemaSAXHandleEndElementNs()
27398 if ((!xmlStrEqual(vctxt->inode->localName, localname)) || in xmlSchemaSAXHandleEndElementNs()
27399 (!xmlStrEqual(vctxt->inode->nsName, URI))) { in xmlSchemaSAXHandleEndElementNs()
27403 res = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaSAXHandleEndElementNs()
27415 vctxt->err = -1; in xmlSchemaSAXHandleEndElementNs()
27416 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleEndElementNs()
27460 xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaClearValidCtxt() argument
27462 if (vctxt == NULL) in xmlSchemaClearValidCtxt()
27470 vctxt->flags = 0; in xmlSchemaClearValidCtxt()
27471 vctxt->validationRoot = NULL; in xmlSchemaClearValidCtxt()
27472 vctxt->doc = NULL; in xmlSchemaClearValidCtxt()
27474 vctxt->reader = NULL; in xmlSchemaClearValidCtxt()
27476 vctxt->hasKeyrefs = 0; in xmlSchemaClearValidCtxt()
27478 if (vctxt->value != NULL) { in xmlSchemaClearValidCtxt()
27479 xmlSchemaFreeValue(vctxt->value); in xmlSchemaClearValidCtxt()
27480 vctxt->value = NULL; in xmlSchemaClearValidCtxt()
27485 if (vctxt->aidcs != NULL) { in xmlSchemaClearValidCtxt()
27486 xmlSchemaIDCAugPtr cur = vctxt->aidcs, next; in xmlSchemaClearValidCtxt()
27492 vctxt->aidcs = NULL; in xmlSchemaClearValidCtxt()
27494 if (vctxt->idcMatcherCache != NULL) { in xmlSchemaClearValidCtxt()
27495 xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp; in xmlSchemaClearValidCtxt()
27502 vctxt->idcMatcherCache = NULL; in xmlSchemaClearValidCtxt()
27506 if (vctxt->idcNodes != NULL) { in xmlSchemaClearValidCtxt()
27510 for (i = 0; i < vctxt->nbIdcNodes; i++) { in xmlSchemaClearValidCtxt()
27511 item = vctxt->idcNodes[i]; in xmlSchemaClearValidCtxt()
27515 xmlFree(vctxt->idcNodes); in xmlSchemaClearValidCtxt()
27516 vctxt->idcNodes = NULL; in xmlSchemaClearValidCtxt()
27517 vctxt->nbIdcNodes = 0; in xmlSchemaClearValidCtxt()
27518 vctxt->sizeIdcNodes = 0; in xmlSchemaClearValidCtxt()
27523 if (vctxt->xpathStates != NULL) { in xmlSchemaClearValidCtxt()
27524 xmlSchemaFreeIDCStateObjList(vctxt->xpathStates); in xmlSchemaClearValidCtxt()
27525 vctxt->xpathStates = NULL; in xmlSchemaClearValidCtxt()
27530 if (vctxt->nbAttrInfos != 0) { in xmlSchemaClearValidCtxt()
27531 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaClearValidCtxt()
27536 if (vctxt->elemInfos != NULL) { in xmlSchemaClearValidCtxt()
27540 for (i = 0; i < vctxt->sizeElemInfos; i++) { in xmlSchemaClearValidCtxt()
27541 ei = vctxt->elemInfos[i]; in xmlSchemaClearValidCtxt()
27544 xmlSchemaClearElemInfo(vctxt, ei); in xmlSchemaClearValidCtxt()
27547 xmlSchemaItemListClear(vctxt->nodeQNames); in xmlSchemaClearValidCtxt()
27549 xmlDictFree(vctxt->dict); in xmlSchemaClearValidCtxt()
27554 vctxt->dict = xmlDictCreate(); in xmlSchemaClearValidCtxt()
27785 xmlSchemaVDocWalk(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVDocWalk() argument
27794 valRoot = xmlDocGetRootElement(vctxt->doc); in xmlSchemaVDocWalk()
27800 vctxt->depth = -1; in xmlSchemaVDocWalk()
27801 vctxt->validationRoot = valRoot; in xmlSchemaVDocWalk()
27804 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaVDocWalk()
27811 vctxt->depth++; in xmlSchemaVDocWalk()
27812 if (xmlSchemaValidatorPushElem(vctxt) == -1) in xmlSchemaVDocWalk()
27814 ielem = vctxt->inode; in xmlSchemaVDocWalk()
27826 vctxt->nbAttrInfos = 0; in xmlSchemaVDocWalk()
27834 ret = xmlSchemaValidatorPushAttribute(vctxt, in xmlSchemaVDocWalk()
27854 ret = xmlSchemaValidateElem(vctxt); in xmlSchemaVDocWalk()
27867 if ((vctxt->skipDepth != -1) && in xmlSchemaVDocWalk()
27868 (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaVDocWalk()
27877 ret = xmlSchemaVPushText(vctxt, node->type, node->content, in xmlSchemaVDocWalk()
27917 if (node != vctxt->inode->node) { in xmlSchemaVDocWalk()
27922 ret = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaVDocWalk()
27949 xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaPreRun() argument
27953 vctxt->err = 0; in xmlSchemaPreRun()
27954 vctxt->nberrors = 0; in xmlSchemaPreRun()
27955 vctxt->depth = -1; in xmlSchemaPreRun()
27956 vctxt->skipDepth = -1; in xmlSchemaPreRun()
27957 vctxt->xsiAssemble = 0; in xmlSchemaPreRun()
27958 vctxt->hasKeyrefs = 0; in xmlSchemaPreRun()
27960 vctxt->createIDCNodeTables = 1; in xmlSchemaPreRun()
27962 vctxt->createIDCNodeTables = 0; in xmlSchemaPreRun()
27967 if (vctxt->schema == NULL) { in xmlSchemaPreRun()
27970 vctxt->xsiAssemble = 1; in xmlSchemaPreRun()
27977 if ((vctxt->pctxt == NULL) && in xmlSchemaPreRun()
27978 (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1)) in xmlSchemaPreRun()
27980 pctxt = vctxt->pctxt; in xmlSchemaPreRun()
27985 vctxt->schema = xmlSchemaNewSchema(pctxt); in xmlSchemaPreRun()
27986 if (vctxt->schema == NULL) in xmlSchemaPreRun()
27994 pctxt->constructor->mainSchema = vctxt->schema; in xmlSchemaPreRun()
28004 xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt); in xmlSchemaPreRun()
28010 xmlSchemaPostRun(xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaPostRun() argument
28011 if (vctxt->xsiAssemble) { in xmlSchemaPostRun()
28012 if (vctxt->schema != NULL) { in xmlSchemaPostRun()
28013 xmlSchemaFree(vctxt->schema); in xmlSchemaPostRun()
28014 vctxt->schema = NULL; in xmlSchemaPostRun()
28017 xmlSchemaClearValidCtxt(vctxt); in xmlSchemaPostRun()
28021 xmlSchemaVStart(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVStart() argument
28025 if (xmlSchemaPreRun(vctxt) < 0) in xmlSchemaVStart()
28028 if (vctxt->doc != NULL) { in xmlSchemaVStart()
28032 ret = xmlSchemaVDocWalk(vctxt); in xmlSchemaVStart()
28034 } else if (vctxt->reader != NULL) { in xmlSchemaVStart()
28039 ret = xmlSchemaVReaderWalk(vctxt); in xmlSchemaVStart()
28042 } else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) { in xmlSchemaVStart()
28046 ret = xmlParseDocument(vctxt->parserCtxt); in xmlSchemaVStart()
28053 xmlSchemaPostRun(vctxt); in xmlSchemaVStart()
28055 ret = vctxt->err; in xmlSchemaVStart()