• Home
  • Raw
  • Download

Lines Matching refs:vctxt

623     xmlSchemaValidCtxtPtr vctxt;  member
1074 xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt);
2043 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctxt; in xmlSchemaErr4Line() local
2047 vctxt->nberrors++; in xmlSchemaErr4Line()
2048 vctxt->err = error; in xmlSchemaErr4Line()
2049 channel = vctxt->error; in xmlSchemaErr4Line()
2051 channel = vctxt->warning; in xmlSchemaErr4Line()
2053 schannel = vctxt->serror; in xmlSchemaErr4Line()
2054 data = vctxt->errCtxt; in xmlSchemaErr4Line()
2062 (vctxt->depth >= 0) && in xmlSchemaErr4Line()
2063 (vctxt->inode != NULL)) { in xmlSchemaErr4Line()
2064 node = vctxt->inode->node; in xmlSchemaErr4Line()
2070 (vctxt->parserCtxt != NULL) && in xmlSchemaErr4Line()
2071 (vctxt->parserCtxt->input != NULL)) { in xmlSchemaErr4Line()
2072 file = vctxt->parserCtxt->input->filename; in xmlSchemaErr4Line()
2073 line = vctxt->parserCtxt->input->line; in xmlSchemaErr4Line()
2074 col = vctxt->parserCtxt->input->col; in xmlSchemaErr4Line()
2085 if (vctxt->doc != NULL) in xmlSchemaErr4Line()
2086 file = (const char *) vctxt->doc->URL; in xmlSchemaErr4Line()
2087 else if ((vctxt->parserCtxt != NULL) && in xmlSchemaErr4Line()
2088 (vctxt->parserCtxt->input != NULL)) in xmlSchemaErr4Line()
2089 file = vctxt->parserCtxt->input->filename; in xmlSchemaErr4Line()
2091 if (vctxt->locFunc != NULL) { in xmlSchemaErr4Line()
2095 vctxt->locFunc(vctxt->locCtxt, &f, &l); in xmlSchemaErr4Line()
2102 if ((file == NULL) && (vctxt->filename != NULL)) in xmlSchemaErr4Line()
2103 file = vctxt->filename; in xmlSchemaErr4Line()
2221 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) actxt; in xmlSchemaFormatNodeForError() local
2225 if (vctxt->inode->nodeType == XML_ATTRIBUTE_NODE) { in xmlSchemaFormatNodeForError()
2227 vctxt->elemInfos[vctxt->depth]; in xmlSchemaFormatNodeForError()
2239 vctxt->inode->nsName, vctxt->inode->localName)); in xmlSchemaFormatNodeForError()
2387 xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaKeyrefErr() argument
2400 xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR, in xmlSchemaKeyrefErr()
2403 vctxt->nodeQNames->items[idcNode->nodeQNameID +1], in xmlSchemaKeyrefErr()
2404 vctxt->nodeQNames->items[idcNode->nodeQNameID]), in xmlSchemaKeyrefErr()
2761 xmlSchemaCustomErr(ACTXT_CAST vctxt, err, NULL, type, msg, NULL, NULL);
2763 #define VERROR_INT(func, msg) xmlSchemaInternalErr(ACTXT_CAST vctxt, func, msg);
10001 xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaCreatePCtxtOnVCtxt() argument
10003 if (vctxt->pctxt == NULL) { in xmlSchemaCreatePCtxtOnVCtxt()
10004 if (vctxt->schema != NULL) in xmlSchemaCreatePCtxtOnVCtxt()
10005 vctxt->pctxt = in xmlSchemaCreatePCtxtOnVCtxt()
10006 xmlSchemaNewParserCtxtUseDict("*", vctxt->schema->dict); in xmlSchemaCreatePCtxtOnVCtxt()
10008 vctxt->pctxt = xmlSchemaNewParserCtxt("*"); in xmlSchemaCreatePCtxtOnVCtxt()
10009 if (vctxt->pctxt == NULL) { in xmlSchemaCreatePCtxtOnVCtxt()
10015 xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error, in xmlSchemaCreatePCtxtOnVCtxt()
10016 vctxt->warning, vctxt->errCtxt); in xmlSchemaCreatePCtxtOnVCtxt()
10017 xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror, in xmlSchemaCreatePCtxtOnVCtxt()
10018 vctxt->errCtxt); in xmlSchemaCreatePCtxtOnVCtxt()
12542 if (ctxt->vctxt != NULL) { in xmlSchemaFreeParserCtxt()
12543 xmlSchemaFreeValidCtxt(ctxt->vctxt); in xmlSchemaFreeParserCtxt()
15772 if (ctxt->vctxt == NULL) { in xmlSchemaCreateVCtxtOnPCtxt()
15773 ctxt->vctxt = xmlSchemaNewValidCtxt(NULL); in xmlSchemaCreateVCtxtOnPCtxt()
15774 if (ctxt->vctxt == NULL) { in xmlSchemaCreateVCtxtOnPCtxt()
15783 xmlSchemaSetValidErrors(ctxt->vctxt, in xmlSchemaCreateVCtxtOnPCtxt()
15785 xmlSchemaSetValidStructuredErrors(ctxt->vctxt, in xmlSchemaCreateVCtxtOnPCtxt()
18867 if (pctxt->vctxt == NULL) { in xmlSchemaCheckFacetValues()
18871 pctxt->vctxt->schema = pctxt->schema; in xmlSchemaCheckFacetValues()
18877 pctxt->vctxt->schema = NULL; in xmlSchemaCheckFacetValues()
21440 if (ctxt->vctxt != NULL) in xmlSchemaSetParserErrors()
21441 xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx); in xmlSchemaSetParserErrors()
21461 if (ctxt->vctxt != NULL) in xmlSchemaSetParserStructuredErrors()
21462 xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx); in xmlSchemaSetParserStructuredErrors()
21606 xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaAssembleByLocation() argument
21616 if ((vctxt == NULL) || (schema == NULL)) in xmlSchemaAssembleByLocation()
21619 if (vctxt->pctxt == NULL) { in xmlSchemaAssembleByLocation()
21624 pctxt = vctxt->pctxt; in xmlSchemaAssembleByLocation()
21649 xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC, in xmlSchemaAssembleByLocation()
21697 if ((ret != 0) && (vctxt->err == 0)) in xmlSchemaAssembleByLocation()
21698 vctxt->err = ret; in xmlSchemaAssembleByLocation()
21699 vctxt->nberrors += pctxt->nberrors; in xmlSchemaAssembleByLocation()
21702 vctxt->nberrors += pctxt->nberrors; in xmlSchemaAssembleByLocation()
21712 xmlSchemaGetMetaAttrInfo(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaGetMetaAttrInfo() argument
21715 if (vctxt->nbAttrInfos == 0) in xmlSchemaGetMetaAttrInfo()
21721 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaGetMetaAttrInfo()
21722 iattr = vctxt->attrInfos[i]; in xmlSchemaGetMetaAttrInfo()
21744 xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaAssembleByXSI() argument
21760 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaAssembleByXSI()
21763 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaAssembleByXSI()
21784 nsname = xmlDictLookup(vctxt->schema->dict, cur, end - cur); in xmlSchemaAssembleByXSI()
21803 xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC, in xmlSchemaAssembleByXSI()
21811 location = xmlDictLookup(vctxt->schema->dict, cur, end - cur); in xmlSchemaAssembleByXSI()
21813 ret = xmlSchemaAssembleByLocation(vctxt, vctxt->schema, in xmlSchemaAssembleByXSI()
21825 xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaLookupNamespace() argument
21828 if (vctxt->sax != NULL) { in xmlSchemaLookupNamespace()
21832 for (i = vctxt->depth; i >= 0; i--) { in xmlSchemaLookupNamespace()
21833 if (vctxt->elemInfos[i]->nbNsBindings != 0) { in xmlSchemaLookupNamespace()
21834 inode = vctxt->elemInfos[i]; in xmlSchemaLookupNamespace()
21852 } else if (vctxt->reader != NULL) { in xmlSchemaLookupNamespace()
21855 nsName = xmlTextReaderLookupNamespace(vctxt->reader, prefix); in xmlSchemaLookupNamespace()
21859 ret = xmlDictLookup(vctxt->dict, nsName, -1); in xmlSchemaLookupNamespace()
21868 if ((vctxt->inode->node == NULL) || in xmlSchemaLookupNamespace()
21869 (vctxt->inode->node->doc == NULL)) { in xmlSchemaLookupNamespace()
21874 ns = xmlSearchNs(vctxt->inode->node->doc, in xmlSchemaLookupNamespace()
21875 vctxt->inode->node, prefix); in xmlSchemaLookupNamespace()
21886 xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateNotation() argument
21895 if (vctxt && (vctxt->schema == NULL)) { in xmlSchemaValidateNotation()
21911 if (vctxt != NULL) in xmlSchemaValidateNotation()
21912 nsName = xmlSchemaLookupNamespace(vctxt, BAD_CAST prefix); in xmlSchemaValidateNotation()
21954 xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVAddNodeQName() argument
21960 lname = xmlDictLookup(vctxt->dict, lname, -1); in xmlSchemaVAddNodeQName()
21964 nsname = xmlDictLookup(vctxt->dict, nsname, -1); in xmlSchemaVAddNodeQName()
21968 for (i = 0; i < vctxt->nodeQNames->nbItems; i += 2) { in xmlSchemaVAddNodeQName()
21969 if ((vctxt->nodeQNames->items [i] == lname) && in xmlSchemaVAddNodeQName()
21970 (vctxt->nodeQNames->items[i +1] == nsname)) in xmlSchemaVAddNodeQName()
21975 i = vctxt->nodeQNames->nbItems; in xmlSchemaVAddNodeQName()
21976 xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) lname); in xmlSchemaVAddNodeQName()
21977 xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) nsname); in xmlSchemaVAddNodeQName()
21997 xmlSchemaValidCtxtPtr vctxt) in xmlSchemaAugmentIDC() argument
22003 xmlSchemaVErrMemory(vctxt, in xmlSchemaAugmentIDC()
22011 if (vctxt->aidcs == NULL) in xmlSchemaAugmentIDC()
22012 vctxt->aidcs = aidc; in xmlSchemaAugmentIDC()
22014 aidc->next = vctxt->aidcs; in xmlSchemaAugmentIDC()
22015 vctxt->aidcs = aidc; in xmlSchemaAugmentIDC()
22020 if ((vctxt->hasKeyrefs == 0) && in xmlSchemaAugmentIDC()
22022 vctxt->hasKeyrefs = 1; in xmlSchemaAugmentIDC()
22032 xmlSchemaAugmentImportedIDC(xmlSchemaImportPtr imported, xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaAugmentImportedIDC() argument
22035 (xmlHashScanner) xmlSchemaAugmentIDC, vctxt); in xmlSchemaAugmentImportedIDC()
22076 xmlSchemaIDCStoreNodeTableItem(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCStoreNodeTableItem() argument
22082 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22083 vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) in xmlSchemaIDCStoreNodeTableItem()
22085 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22086 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreNodeTableItem()
22090 vctxt->sizeIdcNodes = 20; in xmlSchemaIDCStoreNodeTableItem()
22091 } else if (vctxt->sizeIdcNodes <= vctxt->nbIdcNodes) { in xmlSchemaIDCStoreNodeTableItem()
22092 vctxt->sizeIdcNodes *= 2; in xmlSchemaIDCStoreNodeTableItem()
22093 vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *) in xmlSchemaIDCStoreNodeTableItem()
22094 xmlRealloc(vctxt->idcNodes, vctxt->sizeIdcNodes * in xmlSchemaIDCStoreNodeTableItem()
22096 if (vctxt->idcNodes == NULL) { in xmlSchemaIDCStoreNodeTableItem()
22097 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreNodeTableItem()
22102 vctxt->idcNodes[vctxt->nbIdcNodes++] = item; in xmlSchemaIDCStoreNodeTableItem()
22117 xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCStoreKey() argument
22123 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22124 vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) in xmlSchemaIDCStoreKey()
22126 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22127 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreKey()
22131 vctxt->sizeIdcKeys = 40; in xmlSchemaIDCStoreKey()
22132 } else if (vctxt->sizeIdcKeys <= vctxt->nbIdcKeys) { in xmlSchemaIDCStoreKey()
22133 vctxt->sizeIdcKeys *= 2; in xmlSchemaIDCStoreKey()
22134 vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) in xmlSchemaIDCStoreKey()
22135 xmlRealloc(vctxt->idcKeys, vctxt->sizeIdcKeys * in xmlSchemaIDCStoreKey()
22137 if (vctxt->idcKeys == NULL) { in xmlSchemaIDCStoreKey()
22138 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCStoreKey()
22143 vctxt->idcKeys[vctxt->nbIdcKeys++] = key; in xmlSchemaIDCStoreKey()
22197 xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCAcquireBinding() argument
22202 ielem = vctxt->elemInfos[matcher->depth]; in xmlSchemaIDCAcquireBinding()
22229 xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, in xmlSchemaIDCAcquireTargetList()
22336 xmlSchemaIDCReleaseMatcherList(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCReleaseMatcherList() argument
22377 if (vctxt->idcMatcherCache != NULL) in xmlSchemaIDCReleaseMatcherList()
22378 matcher->nextCached = vctxt->idcMatcherCache; in xmlSchemaIDCReleaseMatcherList()
22379 vctxt->idcMatcherCache = matcher; in xmlSchemaIDCReleaseMatcherList()
22400 xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCAddStateObject() argument
22410 if (vctxt->xpathStatePool != NULL) { in xmlSchemaIDCAddStateObject()
22411 sto = vctxt->xpathStatePool; in xmlSchemaIDCAddStateObject()
22412 vctxt->xpathStatePool = sto->next; in xmlSchemaIDCAddStateObject()
22429 if (vctxt->xpathStates != NULL) in xmlSchemaIDCAddStateObject()
22430 sto->next = vctxt->xpathStates; in xmlSchemaIDCAddStateObject()
22431 vctxt->xpathStates = sto; in xmlSchemaIDCAddStateObject()
22450 sto->depth = vctxt->depth; in xmlSchemaIDCAddStateObject()
22473 xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaXPathEvaluate() argument
22477 int res, resolved = 0, depth = vctxt->depth; in xmlSchemaXPathEvaluate()
22479 if (vctxt->xpathStates == NULL) in xmlSchemaXPathEvaluate()
22489 xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaXPathEvaluate()
22490 vctxt->inode->localName), depth, nodeType); in xmlSchemaXPathEvaluate()
22497 first = vctxt->xpathStates; in xmlSchemaXPathEvaluate()
22510 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathEvaluate()
22513 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathEvaluate()
22554 vctxt->depth); in xmlSchemaXPathEvaluate()
22569 if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher, in xmlSchemaXPathEvaluate()
22587 if ((vctxt->inode->flags & in xmlSchemaXPathEvaluate()
22589 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; in xmlSchemaXPathEvaluate()
22599 sto = vctxt->xpathStates; in xmlSchemaXPathEvaluate()
22607 xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaFormatIDCKeySequence() argument
22651 xmlSchemaXPathPop(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaXPathPop() argument
22656 if (vctxt->xpathStates == NULL) in xmlSchemaXPathPop()
22658 sto = vctxt->xpathStates; in xmlSchemaXPathPop()
22680 xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaXPathProcessHistory() argument
22686 xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL; in xmlSchemaXPathProcessHistory()
22688 if (vctxt->xpathStates == NULL) in xmlSchemaXPathProcessHistory()
22690 sto = vctxt->xpathStates; in xmlSchemaXPathProcessHistory()
22697 xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaXPathProcessHistory()
22698 vctxt->inode->localName), vctxt->depth); in xmlSchemaXPathProcessHistory()
22758 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
22770 if ((key == NULL) && (vctxt->inode->val == NULL)) { in xmlSchemaXPathProcessHistory()
22867 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
22913 key->val = vctxt->inode->val; in xmlSchemaXPathProcessHistory()
22914 vctxt->inode->val = NULL; in xmlSchemaXPathProcessHistory()
22918 if (xmlSchemaIDCStoreKey(vctxt, key) == -1) { in xmlSchemaXPathProcessHistory()
22997 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); in xmlSchemaXPathProcessHistory()
22999 targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher); in xmlSchemaXPathProcessHistory()
23039 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
23043 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaXPathProcessHistory()
23069 if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) { in xmlSchemaXPathProcessHistory()
23081 ntItem->nodeQNameID = xmlSchemaVAddNodeQName(vctxt, in xmlSchemaXPathProcessHistory()
23082 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaXPathProcessHistory()
23094 ntItem->node = vctxt->node; in xmlSchemaXPathProcessHistory()
23095 ntItem->nodeLine = vctxt->inode->nodeLine; in xmlSchemaXPathProcessHistory()
23123 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaXPathProcessHistory()
23151 if (vctxt->xpathStates != sto) { in xmlSchemaXPathProcessHistory()
23160 vctxt->xpathStates = sto->next; in xmlSchemaXPathProcessHistory()
23161 sto->next = vctxt->xpathStatePool; in xmlSchemaXPathProcessHistory()
23165 vctxt->xpathStatePool = sto; in xmlSchemaXPathProcessHistory()
23184 xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCRegisterMatchers() argument
23200 (char *) xmlSchemaFormatQName(&str, vctxt->inode->nsName, in xmlSchemaIDCRegisterMatchers()
23201 vctxt->inode->localName), vctxt->depth); in xmlSchemaIDCRegisterMatchers()
23205 if (vctxt->inode->idcMatchers != NULL) { in xmlSchemaIDCRegisterMatchers()
23224 vctxt->inode->hasKeyrefs = 1; in xmlSchemaIDCRegisterMatchers()
23228 aidc = vctxt->aidcs; in xmlSchemaIDCRegisterMatchers()
23241 (vctxt->depth < aidc->keyrefDepth)) in xmlSchemaIDCRegisterMatchers()
23242 aidc->keyrefDepth = vctxt->depth; in xmlSchemaIDCRegisterMatchers()
23248 aidc = vctxt->aidcs; in xmlSchemaIDCRegisterMatchers()
23262 if (vctxt->idcMatcherCache != NULL) { in xmlSchemaIDCRegisterMatchers()
23266 matcher = vctxt->idcMatcherCache; in xmlSchemaIDCRegisterMatchers()
23267 vctxt->idcMatcherCache = matcher->nextCached; in xmlSchemaIDCRegisterMatchers()
23273 xmlSchemaVErrMemory(vctxt, in xmlSchemaIDCRegisterMatchers()
23280 vctxt->inode->idcMatchers = matcher; in xmlSchemaIDCRegisterMatchers()
23286 matcher->depth = vctxt->depth; in xmlSchemaIDCRegisterMatchers()
23295 if (xmlSchemaIDCAddStateObject(vctxt, matcher, in xmlSchemaIDCRegisterMatchers()
23305 xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaIDCFillNodeTables() argument
23329 if ((! vctxt->createIDCNodeTables) && in xmlSchemaIDCFillNodeTables()
23331 (matcher->aidc->keyrefDepth > vctxt->depth))) in xmlSchemaIDCFillNodeTables()
23339 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); in xmlSchemaIDCFillNodeTables()
23501 xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaBubbleIDCNodeTables() argument
23509 bind = vctxt->inode->idcTable; in xmlSchemaBubbleIDCNodeTables()
23515 parTable = &(vctxt->elemInfos[vctxt->depth -1]->idcTable); in xmlSchemaBubbleIDCNodeTables()
23527 if (! vctxt->createIDCNodeTables) { in xmlSchemaBubbleIDCNodeTables()
23528 aidc = vctxt->aidcs; in xmlSchemaBubbleIDCNodeTables()
23532 (aidc->keyrefDepth >= vctxt->depth)) { in xmlSchemaBubbleIDCNodeTables()
23727 if (! vctxt->psviExposeIDCNodeTables) { in xmlSchemaBubbleIDCNodeTables()
23796 xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaCheckCVCIDCKeyRef() argument
23801 matcher = vctxt->inode->idcMatchers; in xmlSchemaCheckCVCIDCKeyRef()
23819 bind = vctxt->inode->idcTable; in xmlSchemaCheckCVCIDCKeyRef()
23874 xmlSchemaKeyrefErr(vctxt, in xmlSchemaCheckCVCIDCKeyRef()
23879 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaCheckCVCIDCKeyRef()
23893 xmlSchemaKeyrefErr(vctxt, in xmlSchemaCheckCVCIDCKeyRef()
23897 xmlSchemaFormatIDCKeySequence(vctxt, &str, in xmlSchemaCheckCVCIDCKeyRef()
23918 xmlSchemaGetFreshAttrInfo(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaGetFreshAttrInfo() argument
23924 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23925 vctxt->attrInfos = (xmlSchemaAttrInfoPtr *) in xmlSchemaGetFreshAttrInfo()
23927 vctxt->sizeAttrInfos = 1; in xmlSchemaGetFreshAttrInfo()
23928 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23929 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshAttrInfo()
23933 } else if (vctxt->sizeAttrInfos <= vctxt->nbAttrInfos) { in xmlSchemaGetFreshAttrInfo()
23934 vctxt->sizeAttrInfos++; in xmlSchemaGetFreshAttrInfo()
23935 vctxt->attrInfos = (xmlSchemaAttrInfoPtr *) in xmlSchemaGetFreshAttrInfo()
23936 xmlRealloc(vctxt->attrInfos, in xmlSchemaGetFreshAttrInfo()
23937 vctxt->sizeAttrInfos * sizeof(xmlSchemaAttrInfoPtr)); in xmlSchemaGetFreshAttrInfo()
23938 if (vctxt->attrInfos == NULL) { in xmlSchemaGetFreshAttrInfo()
23939 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshAttrInfo()
23944 iattr = vctxt->attrInfos[vctxt->nbAttrInfos++]; in xmlSchemaGetFreshAttrInfo()
23959 xmlSchemaVErrMemory(vctxt, "creating new attribute info", NULL); in xmlSchemaGetFreshAttrInfo()
23964 vctxt->attrInfos[vctxt->nbAttrInfos++] = iattr; in xmlSchemaGetFreshAttrInfo()
23970 xmlSchemaValidatorPushAttribute(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidatorPushAttribute() argument
23981 attr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaValidatorPushAttribute()
24032 xmlSchemaClearElemInfo(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaClearElemInfo() argument
24062 xmlSchemaIDCReleaseMatcherList(vctxt, ielem->idcMatchers); in xmlSchemaClearElemInfo()
24097 xmlSchemaGetFreshElemInfo(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaGetFreshElemInfo() argument
24101 if (vctxt->depth > vctxt->sizeElemInfos) { in xmlSchemaGetFreshElemInfo()
24106 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24107 vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) in xmlSchemaGetFreshElemInfo()
24109 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24110 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24114 memset(vctxt->elemInfos, 0, 10 * sizeof(xmlSchemaNodeInfoPtr)); in xmlSchemaGetFreshElemInfo()
24115 vctxt->sizeElemInfos = 10; in xmlSchemaGetFreshElemInfo()
24116 } else if (vctxt->sizeElemInfos <= vctxt->depth) { in xmlSchemaGetFreshElemInfo()
24117 int i = vctxt->sizeElemInfos; in xmlSchemaGetFreshElemInfo()
24119 vctxt->sizeElemInfos *= 2; in xmlSchemaGetFreshElemInfo()
24120 vctxt->elemInfos = (xmlSchemaNodeInfoPtr *) in xmlSchemaGetFreshElemInfo()
24121 xmlRealloc(vctxt->elemInfos, vctxt->sizeElemInfos * in xmlSchemaGetFreshElemInfo()
24123 if (vctxt->elemInfos == NULL) { in xmlSchemaGetFreshElemInfo()
24124 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24132 for (; i < vctxt->sizeElemInfos; i++) in xmlSchemaGetFreshElemInfo()
24133 vctxt->elemInfos[i] = NULL; in xmlSchemaGetFreshElemInfo()
24135 info = vctxt->elemInfos[vctxt->depth]; in xmlSchemaGetFreshElemInfo()
24141 xmlSchemaVErrMemory(vctxt, in xmlSchemaGetFreshElemInfo()
24145 vctxt->elemInfos[vctxt->depth] = info; in xmlSchemaGetFreshElemInfo()
24155 info->depth = vctxt->depth; in xmlSchemaGetFreshElemInfo()
24160 #define ACTIVATE_ATTRIBUTE(item) vctxt->inode = (xmlSchemaNodeInfoPtr) item;
24161 #define ACTIVATE_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth];
24162 #define ACTIVATE_PARENT_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth -1];
24414 xmlSchemaValidateQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateQName() argument
24444 nsName = xmlSchemaLookupNamespace(vctxt, prefix); in xmlSchemaValidateQName()
24454 xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL, in xmlSchemaValidateQName()
24822 xmlSchemaVExpandQName(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVExpandQName() argument
24838 xmlSchemaSimpleTypeErr(ACTXT_CAST vctxt, in xmlSchemaVExpandQName()
24853 *localName = xmlDictLookup(vctxt->dict, value, -1); in xmlSchemaVExpandQName()
24855 *localName = xmlDictLookup(vctxt->dict, local, -1); in xmlSchemaVExpandQName()
24859 *nsName = xmlSchemaLookupNamespace(vctxt, prefix); in xmlSchemaVExpandQName()
24867 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVExpandQName()
24881 xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaProcessXSIType() argument
24910 ret = xmlSchemaVExpandQName(vctxt, iattr->value, in xmlSchemaProcessXSIType()
24925 *localType = xmlSchemaGetType(vctxt->schema, local, nsName); in xmlSchemaProcessXSIType()
24929 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaProcessXSIType()
24936 ret = vctxt->err; in xmlSchemaProcessXSIType()
24983 if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType, in xmlSchemaProcessXSIType()
24987 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaProcessXSIType()
24997 ret = vctxt->err; in xmlSchemaProcessXSIType()
25011 xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateElemDecl() argument
25013 xmlSchemaElementPtr elemDecl = vctxt->inode->decl; in xmlSchemaValidateElemDecl()
25022 return (vctxt->err); in xmlSchemaValidateElemDecl()
25031 return (vctxt->err); in xmlSchemaValidateElemDecl()
25038 if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElemDecl()
25045 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemDecl()
25053 ACTXT_CAST vctxt, NULL, in xmlSchemaValidateElemDecl()
25084 vctxt->inode->flags |= in xmlSchemaValidateElemDecl()
25094 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemDecl()
25099 ret = xmlSchemaProcessXSIType(vctxt, iattr, &localType, in xmlSchemaValidateElemDecl()
25111 vctxt->inode->flags |= XML_SCHEMA_ELEM_INFO_LOCAL_TYPE; in xmlSchemaValidateElemDecl()
25120 (xmlSchemaIDCRegisterMatchers(vctxt, elemDecl) == -1)) in xmlSchemaValidateElemDecl()
25133 vctxt->inode->typeDef = actualType; in xmlSchemaValidateElemDecl()
25139 xmlSchemaVAttributesSimple(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVAttributesSimple() argument
25151 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesSimple()
25153 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesSimple()
25154 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesSimple()
25157 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesSimple()
25170 xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaClearAttrInfos() argument
25175 if (vctxt->nbAttrInfos == 0) in xmlSchemaClearAttrInfos()
25177 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaClearAttrInfos()
25178 attr = vctxt->attrInfos[i]; in xmlSchemaClearAttrInfos()
25195 vctxt->nbAttrInfos = 0; in xmlSchemaClearAttrInfos()
25209 xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVAttributesComplex() argument
25211 xmlSchemaTypePtr type = vctxt->inode->typeDef; in xmlSchemaVAttributesComplex()
25243 nbAttrs = vctxt->nbAttrInfos; in xmlSchemaVAttributesComplex()
25253 iattr = vctxt->attrInfos[j]; in xmlSchemaVAttributesComplex()
25306 tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaVAttributesComplex()
25322 tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); in xmlSchemaVAttributesComplex()
25338 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesComplex()
25349 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25392 iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, in xmlSchemaVAttributesComplex()
25458 if (vctxt->nbAttrInfos == 0) in xmlSchemaVAttributesComplex()
25465 if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { in xmlSchemaVAttributesComplex()
25466 xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth]; in xmlSchemaVAttributesComplex()
25473 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesComplex()
25474 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25495 if (vctxt->xpathStates != NULL) { in xmlSchemaVAttributesComplex()
25499 xpathRes = xmlSchemaXPathEvaluate(vctxt, in xmlSchemaVAttributesComplex()
25594 ns = xmlNewNs(vctxt->validationRoot, in xmlSchemaVAttributesComplex()
25616 if (vctxt->value != NULL) { in xmlSchemaVAttributesComplex()
25620 xmlSchemaFreeValue(vctxt->value); in xmlSchemaVAttributesComplex()
25621 vctxt->value = NULL; in xmlSchemaVAttributesComplex()
25648 ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25653 ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25735 if (xmlSchemaXPathProcessHistory(vctxt, in xmlSchemaVAttributesComplex()
25736 vctxt->depth +1) == -1) { in xmlSchemaVAttributesComplex()
25741 } else if (vctxt->xpathStates != NULL) in xmlSchemaVAttributesComplex()
25742 xmlSchemaXPathPop(vctxt); in xmlSchemaVAttributesComplex()
25748 for (i = 0; i < vctxt->nbAttrInfos; i++) { in xmlSchemaVAttributesComplex()
25749 iattr = vctxt->attrInfos[i]; in xmlSchemaVAttributesComplex()
25760 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25775 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25794 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25797 xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, in xmlSchemaVAttributesComplex()
25814 xmlSchemaValidateElemWildcard(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateElemWildcard() argument
25817 xmlSchemaWildcardPtr wild = (xmlSchemaWildcardPtr) vctxt->inode->decl; in xmlSchemaValidateElemWildcard()
25840 decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateElemWildcard()
25841 vctxt->inode->localName, vctxt->inode->nsName); in xmlSchemaValidateElemWildcard()
25843 vctxt->inode->decl = decl; in xmlSchemaValidateElemWildcard()
25852 return (vctxt->err); in xmlSchemaValidateElemWildcard()
25854 if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElemWildcard()
25862 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateElemWildcard()
25865 if (xmlSchemaProcessXSIType(vctxt, iattr, in xmlSchemaValidateElemWildcard()
25866 &(vctxt->inode->typeDef), NULL) == -1) { in xmlSchemaValidateElemWildcard()
25883 vctxt->inode->typeDef = in xmlSchemaValidateElemWildcard()
25896 xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaCheckCOSValidDefault() argument
25901 xmlSchemaNodeInfoPtr inode = vctxt->inode; in xmlSchemaCheckCOSValidDefault()
25944 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, in xmlSchemaCheckCOSValidDefault()
25949 ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, in xmlSchemaCheckCOSValidDefault()
25960 xmlSchemaVContentModelCallback(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, in xmlSchemaVContentModelCallback()
25988 xmlSchemaValidatorPushElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidatorPushElem() argument
25990 vctxt->inode = xmlSchemaGetFreshElemInfo(vctxt); in xmlSchemaValidatorPushElem()
25991 if (vctxt->inode == NULL) { in xmlSchemaValidatorPushElem()
25996 vctxt->nbAttrInfos = 0; in xmlSchemaValidatorPushElem()
26001 xmlSchemaVCheckINodeDataType(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVCheckINodeDataType() argument
26008 ACTXT_CAST vctxt, NULL, in xmlSchemaVCheckINodeDataType()
26012 ACTXT_CAST vctxt, NULL, in xmlSchemaVCheckINodeDataType()
26022 xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidatorPopElem() argument
26025 xmlSchemaNodeInfoPtr inode = vctxt->inode; in xmlSchemaValidatorPopElem()
26027 if (vctxt->nbAttrInfos != 0) in xmlSchemaValidatorPopElem()
26028 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaValidatorPopElem()
26035 vctxt->skipDepth = vctxt->depth -1; in xmlSchemaValidatorPopElem()
26070 vctxt); in xmlSchemaValidatorPopElem()
26109 xmlSchemaComplexTypeErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26140 if (vctxt->value != NULL) { in xmlSchemaValidatorPopElem()
26141 xmlSchemaFreeValue(vctxt->value); in xmlSchemaValidatorPopElem()
26142 vctxt->value = NULL; in xmlSchemaValidatorPopElem()
26152 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26155 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26194 ret = xmlSchemaCheckCOSValidDefault(vctxt, in xmlSchemaValidatorPopElem()
26219 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26222 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26239 if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) && in xmlSchemaValidatorPopElem()
26276 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26291 ret = xmlSchemaVCheckINodeDataType(vctxt, in xmlSchemaValidatorPopElem()
26347 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26370 xmlSchemaCustomErr(ACTXT_CAST vctxt, in xmlSchemaValidatorPopElem()
26384 if (vctxt->depth < 0) { in xmlSchemaValidatorPopElem()
26388 if (vctxt->depth == vctxt->skipDepth) in xmlSchemaValidatorPopElem()
26389 vctxt->skipDepth = -1; in xmlSchemaValidatorPopElem()
26394 (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1)) in xmlSchemaValidatorPopElem()
26413 (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) in xmlSchemaValidatorPopElem()
26415 if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1) in xmlSchemaValidatorPopElem()
26421 if (vctxt->inode->hasKeyrefs) in xmlSchemaValidatorPopElem()
26422 if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) in xmlSchemaValidatorPopElem()
26434 if ((vctxt->depth > 0) && in xmlSchemaValidatorPopElem()
26435 (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) in xmlSchemaValidatorPopElem()
26440 if (xmlSchemaBubbleIDCNodeTables(vctxt) == -1) in xmlSchemaValidatorPopElem()
26449 xmlSchemaClearElemInfo(vctxt, inode); in xmlSchemaValidatorPopElem()
26453 if (vctxt->depth == 0) { in xmlSchemaValidatorPopElem()
26454 vctxt->depth--; in xmlSchemaValidatorPopElem()
26455 vctxt->inode = NULL; in xmlSchemaValidatorPopElem()
26461 if (vctxt->aidcs != NULL) { in xmlSchemaValidatorPopElem()
26462 xmlSchemaIDCAugPtr aidc = vctxt->aidcs; in xmlSchemaValidatorPopElem()
26464 if (aidc->keyrefDepth == vctxt->depth) { in xmlSchemaValidatorPopElem()
26475 vctxt->depth--; in xmlSchemaValidatorPopElem()
26476 vctxt->inode = vctxt->elemInfos[vctxt->depth]; in xmlSchemaValidatorPopElem()
26484 vctxt->err = -1; in xmlSchemaValidatorPopElem()
26493 xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateChildElem() argument
26499 if (vctxt->depth <= 0) { in xmlSchemaValidateChildElem()
26504 pielem = vctxt->elemInfos[vctxt->depth -1]; in xmlSchemaValidateChildElem()
26531 vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateChildElem()
26532 vctxt->inode->localName, in xmlSchemaValidateChildElem()
26533 vctxt->inode->nsName); in xmlSchemaValidateChildElem()
26535 if (vctxt->inode->decl == NULL) { in xmlSchemaValidateChildElem()
26541 iattr = xmlSchemaGetMetaAttrInfo(vctxt, in xmlSchemaValidateChildElem()
26544 ret = xmlSchemaProcessXSIType(vctxt, iattr, in xmlSchemaValidateChildElem()
26545 &(vctxt->inode->typeDef), NULL); in xmlSchemaValidateChildElem()
26566 vctxt->inode->typeDef = in xmlSchemaValidateChildElem()
26619 vctxt); in xmlSchemaValidateChildElem()
26641 vctxt->inode->localName, in xmlSchemaValidateChildElem()
26642 vctxt->inode->nsName, in xmlSchemaValidateChildElem()
26643 vctxt->inode); in xmlSchemaValidateChildElem()
26648 vctxt->inode->localName, pielem->localName); in xmlSchemaValidateChildElem()
26652 vctxt->inode->localName, pielem->localName); in xmlSchemaValidateChildElem()
26654 if (vctxt->err == XML_SCHEMAV_INTERNAL) { in xmlSchemaValidateChildElem()
26662 xmlSchemaComplexTypeErr(ACTXT_CAST vctxt, in xmlSchemaValidateChildElem()
26666 ret = vctxt->err; in xmlSchemaValidateChildElem()
26695 ret = vctxt->err; in xmlSchemaValidateChildElem()
26708 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateChildElem()
26709 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_NOT_EXPECTED; in xmlSchemaValidateChildElem()
26719 xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaVPushText() argument
26734 if (INODE_NILLED(vctxt->inode)) { in xmlSchemaVPushText()
26743 return (vctxt->err); in xmlSchemaVPushText()
26750 if (vctxt->inode->typeDef->contentType == in xmlSchemaVPushText()
26755 return (vctxt->err); in xmlSchemaVPushText()
26758 if (vctxt->inode->typeDef->contentType == in xmlSchemaVPushText()
26773 return (vctxt->err); in xmlSchemaVPushText()
26785 if ((vctxt->inode->typeDef->contentType == XML_SCHEMA_CONTENT_MIXED) && in xmlSchemaVPushText()
26786 ((vctxt->inode->decl == NULL) || in xmlSchemaVPushText()
26787 (vctxt->inode->decl->value == NULL))) in xmlSchemaVPushText()
26790 if (vctxt->inode->value == NULL) { in xmlSchemaVPushText()
26799 vctxt->inode->value = value; in xmlSchemaVPushText()
26806 vctxt->inode->value = value; in xmlSchemaVPushText()
26809 vctxt->inode->flags |= in xmlSchemaVPushText()
26818 vctxt->inode->value = BAD_CAST xmlStrndup(value, len); in xmlSchemaVPushText()
26820 vctxt->inode->value = BAD_CAST xmlStrdup(value); in xmlSchemaVPushText()
26821 vctxt->inode->flags |= in xmlSchemaVPushText()
26833 if (vctxt->inode->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES) { in xmlSchemaVPushText()
26834 vctxt->inode->value = BAD_CAST xmlStrncat( in xmlSchemaVPushText()
26835 (xmlChar *) vctxt->inode->value, value, len); in xmlSchemaVPushText()
26837 vctxt->inode->value = in xmlSchemaVPushText()
26838 BAD_CAST xmlStrncatNew(vctxt->inode->value, value, len); in xmlSchemaVPushText()
26839 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES; in xmlSchemaVPushText()
26847 xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaValidateElem() argument
26851 if ((vctxt->skipDepth != -1) && in xmlSchemaValidateElem()
26852 (vctxt->depth >= vctxt->skipDepth)) { in xmlSchemaValidateElem()
26857 if (vctxt->xsiAssemble) { in xmlSchemaValidateElem()
26868 ret = xmlSchemaAssembleByXSI(vctxt); in xmlSchemaValidateElem()
26872 vctxt->skipDepth = 0; in xmlSchemaValidateElem()
26879 … xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt); in xmlSchemaValidateElem()
26881 if (vctxt->depth > 0) { in xmlSchemaValidateElem()
26886 ret = xmlSchemaValidateChildElem(vctxt); in xmlSchemaValidateElem()
26895 if (vctxt->depth == vctxt->skipDepth) in xmlSchemaValidateElem()
26897 if ((vctxt->inode->decl == NULL) && in xmlSchemaValidateElem()
26898 (vctxt->inode->typeDef == NULL)) { in xmlSchemaValidateElem()
26908 vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema, in xmlSchemaValidateElem()
26909 vctxt->inode->localName, in xmlSchemaValidateElem()
26910 vctxt->inode->nsName); in xmlSchemaValidateElem()
26911 if (vctxt->inode->decl == NULL) { in xmlSchemaValidateElem()
26920 if (vctxt->inode->decl == NULL) in xmlSchemaValidateElem()
26923 if (vctxt->inode->decl->type == XML_SCHEMA_TYPE_ANY) { in xmlSchemaValidateElem()
26928 ret = xmlSchemaValidateElemWildcard(vctxt, &skip); in xmlSchemaValidateElem()
26938 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateElem()
26945 if (vctxt->inode->decl->type != XML_SCHEMA_TYPE_ELEMENT) { in xmlSchemaValidateElem()
26949 vctxt->inode->decl = NULL; in xmlSchemaValidateElem()
26956 ret = xmlSchemaValidateElemDecl(vctxt); in xmlSchemaValidateElem()
26970 if (vctxt->inode->typeDef == NULL) { in xmlSchemaValidateElem()
26971 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE; in xmlSchemaValidateElem()
26977 if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) { in xmlSchemaValidateElem()
26978 vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE; in xmlSchemaValidateElem()
26989 if (vctxt->xpathStates != NULL) { in xmlSchemaValidateElem()
26990 ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE); in xmlSchemaValidateElem()
26991 vctxt->inode->appliedXPath = 1; in xmlSchemaValidateElem()
27001 if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) { in xmlSchemaValidateElem()
27002 if ((vctxt->nbAttrInfos != 0) || in xmlSchemaValidateElem()
27003 (vctxt->inode->typeDef->attrUses != NULL)) { in xmlSchemaValidateElem()
27005 ret = xmlSchemaVAttributesComplex(vctxt); in xmlSchemaValidateElem()
27007 } else if (vctxt->nbAttrInfos != 0) { in xmlSchemaValidateElem()
27009 ret = xmlSchemaVAttributesSimple(vctxt); in xmlSchemaValidateElem()
27014 if (vctxt->nbAttrInfos != 0) in xmlSchemaValidateElem()
27015 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaValidateElem()
27028 vctxt->skipDepth = vctxt->depth; in xmlSchemaValidateElem()
27036 xmlSchemaVReaderWalk(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVReaderWalk() argument
27042 vctxt->depth = -1; in xmlSchemaVReaderWalk()
27043 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27048 nodeType = xmlTextReaderNodeType(vctxt->reader); in xmlSchemaVReaderWalk()
27051 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27058 depth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27059 nodeType = xmlTextReaderNodeType(vctxt->reader); in xmlSchemaVReaderWalk()
27063 vctxt->depth++; in xmlSchemaVReaderWalk()
27064 if (xmlSchemaValidatorPushElem(vctxt) == -1) { in xmlSchemaVReaderWalk()
27069 ielem = vctxt->inode; in xmlSchemaVReaderWalk()
27070 ielem->localName = xmlTextReaderLocalName(vctxt->reader); in xmlSchemaVReaderWalk()
27071 ielem->nsName = xmlTextReaderNamespaceUri(vctxt->reader); in xmlSchemaVReaderWalk()
27076 ret = xmlTextReaderIsEmptyElement(vctxt->reader); in xmlSchemaVReaderWalk()
27088 vctxt->nbAttrInfos = 0; in xmlSchemaVReaderWalk()
27089 ret = xmlTextReaderMoveToFirstAttribute(vctxt->reader); in xmlSchemaVReaderWalk()
27101 if (xmlSchemaValidatorPushAttribute(vctxt, NULL, in xmlSchemaVReaderWalk()
27102 (const xmlChar *) xmlTextReaderLocalName(vctxt->reader), in xmlSchemaVReaderWalk()
27103 xmlTextReaderNamespaceUri(vctxt->reader), 1, in xmlSchemaVReaderWalk()
27104 xmlTextReaderValue(vctxt->reader), 1) == -1) { in xmlSchemaVReaderWalk()
27110 ret = xmlTextReaderMoveToNextAttribute(vctxt->reader); in xmlSchemaVReaderWalk()
27120 ret = xmlTextReaderMoveToElement(vctxt->reader); in xmlSchemaVReaderWalk()
27130 ret= xmlSchemaValidateElem(vctxt); in xmlSchemaVReaderWalk()
27139 if (vctxt->depth == vctxt->skipDepth) { in xmlSchemaVReaderWalk()
27145 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27146 curDepth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27148 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27149 curDepth = xmlTextReaderDepth(vctxt->reader); in xmlSchemaVReaderWalk()
27172 ret = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaVReaderWalk()
27181 if (vctxt->depth >= 0) in xmlSchemaVReaderWalk()
27182 ielem = vctxt->inode; in xmlSchemaVReaderWalk()
27197 value = xmlTextReaderValue(vctxt->reader); in xmlSchemaVReaderWalk()
27198 ret = xmlSchemaVPushText(vctxt, nodeType, BAD_CAST value, in xmlSchemaVReaderWalk()
27217 ret = xmlTextReaderRead(vctxt->reader); in xmlSchemaVReaderWalk()
27241 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleText() local
27243 if (vctxt->depth < 0) in xmlSchemaSAXHandleText()
27245 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleText()
27247 if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) in xmlSchemaSAXHandleText()
27248 vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY; in xmlSchemaSAXHandleText()
27249 if (xmlSchemaVPushText(vctxt, XML_TEXT_NODE, ch, len, in xmlSchemaSAXHandleText()
27253 vctxt->err = -1; in xmlSchemaSAXHandleText()
27254 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleText()
27266 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleCDataSection() local
27268 if (vctxt->depth < 0) in xmlSchemaSAXHandleCDataSection()
27270 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleCDataSection()
27272 if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) in xmlSchemaSAXHandleCDataSection()
27273 vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY; in xmlSchemaSAXHandleCDataSection()
27274 if (xmlSchemaVPushText(vctxt, XML_CDATA_SECTION_NODE, ch, len, in xmlSchemaSAXHandleCDataSection()
27278 vctxt->err = -1; in xmlSchemaSAXHandleCDataSection()
27279 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleCDataSection()
27287 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleReference() local
27289 if (vctxt->depth < 0) in xmlSchemaSAXHandleReference()
27291 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleReference()
27308 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleStartElementNs() local
27319 vctxt->depth++; in xmlSchemaSAXHandleStartElementNs()
27320 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaSAXHandleStartElementNs()
27325 if (xmlSchemaValidatorPushElem(vctxt) == -1) { in xmlSchemaSAXHandleStartElementNs()
27330 ielem = vctxt->inode; in xmlSchemaSAXHandleStartElementNs()
27334 ielem->nodeLine = xmlSAX2GetLineNumber(vctxt->parserCtxt); in xmlSchemaSAXHandleStartElementNs()
27355 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27369 xmlSchemaVErrMemory(vctxt, in xmlSchemaSAXHandleStartElementNs()
27407 value = xmlStringLenDecodeEntities(vctxt->parserCtxt, attributes[j+3], in xmlSchemaSAXHandleStartElementNs()
27412 ret = xmlSchemaValidatorPushAttribute(vctxt, in xmlSchemaSAXHandleStartElementNs()
27425 ret = xmlSchemaValidateElem(vctxt); in xmlSchemaSAXHandleStartElementNs()
27438 vctxt->err = -1; in xmlSchemaSAXHandleStartElementNs()
27439 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleStartElementNs()
27449 xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; in xmlSchemaSAXHandleEndElementNs() local
27455 if (vctxt->skipDepth != -1) { in xmlSchemaSAXHandleEndElementNs()
27456 if (vctxt->depth > vctxt->skipDepth) { in xmlSchemaSAXHandleEndElementNs()
27457 vctxt->depth--; in xmlSchemaSAXHandleEndElementNs()
27460 vctxt->skipDepth = -1; in xmlSchemaSAXHandleEndElementNs()
27465 if ((!xmlStrEqual(vctxt->inode->localName, localname)) || in xmlSchemaSAXHandleEndElementNs()
27466 (!xmlStrEqual(vctxt->inode->nsName, URI))) { in xmlSchemaSAXHandleEndElementNs()
27470 res = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaSAXHandleEndElementNs()
27482 vctxt->err = -1; in xmlSchemaSAXHandleEndElementNs()
27483 xmlStopParser(vctxt->parserCtxt); in xmlSchemaSAXHandleEndElementNs()
27528 xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, const char *filename) { in xmlSchemaValidateSetFilename() argument
27529 if (vctxt == NULL) in xmlSchemaValidateSetFilename()
27531 if (vctxt->filename != NULL) in xmlSchemaValidateSetFilename()
27532 xmlFree(vctxt->filename); in xmlSchemaValidateSetFilename()
27534 vctxt->filename = (char *) xmlStrdup((const xmlChar *) filename); in xmlSchemaValidateSetFilename()
27536 vctxt->filename = NULL; in xmlSchemaValidateSetFilename()
27547 xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaClearValidCtxt() argument
27549 if (vctxt == NULL) in xmlSchemaClearValidCtxt()
27557 vctxt->flags = 0; in xmlSchemaClearValidCtxt()
27558 vctxt->validationRoot = NULL; in xmlSchemaClearValidCtxt()
27559 vctxt->doc = NULL; in xmlSchemaClearValidCtxt()
27561 vctxt->reader = NULL; in xmlSchemaClearValidCtxt()
27563 vctxt->hasKeyrefs = 0; in xmlSchemaClearValidCtxt()
27565 if (vctxt->value != NULL) { in xmlSchemaClearValidCtxt()
27566 xmlSchemaFreeValue(vctxt->value); in xmlSchemaClearValidCtxt()
27567 vctxt->value = NULL; in xmlSchemaClearValidCtxt()
27572 if (vctxt->aidcs != NULL) { in xmlSchemaClearValidCtxt()
27573 xmlSchemaIDCAugPtr cur = vctxt->aidcs, next; in xmlSchemaClearValidCtxt()
27579 vctxt->aidcs = NULL; in xmlSchemaClearValidCtxt()
27581 if (vctxt->idcMatcherCache != NULL) { in xmlSchemaClearValidCtxt()
27582 xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp; in xmlSchemaClearValidCtxt()
27589 vctxt->idcMatcherCache = NULL; in xmlSchemaClearValidCtxt()
27593 if (vctxt->idcNodes != NULL) { in xmlSchemaClearValidCtxt()
27597 for (i = 0; i < vctxt->nbIdcNodes; i++) { in xmlSchemaClearValidCtxt()
27598 item = vctxt->idcNodes[i]; in xmlSchemaClearValidCtxt()
27602 xmlFree(vctxt->idcNodes); in xmlSchemaClearValidCtxt()
27603 vctxt->idcNodes = NULL; in xmlSchemaClearValidCtxt()
27604 vctxt->nbIdcNodes = 0; in xmlSchemaClearValidCtxt()
27605 vctxt->sizeIdcNodes = 0; in xmlSchemaClearValidCtxt()
27610 if (vctxt->xpathStates != NULL) { in xmlSchemaClearValidCtxt()
27611 xmlSchemaFreeIDCStateObjList(vctxt->xpathStates); in xmlSchemaClearValidCtxt()
27612 vctxt->xpathStates = NULL; in xmlSchemaClearValidCtxt()
27617 if (vctxt->nbAttrInfos != 0) { in xmlSchemaClearValidCtxt()
27618 xmlSchemaClearAttrInfos(vctxt); in xmlSchemaClearValidCtxt()
27623 if (vctxt->elemInfos != NULL) { in xmlSchemaClearValidCtxt()
27627 for (i = 0; i < vctxt->sizeElemInfos; i++) { in xmlSchemaClearValidCtxt()
27628 ei = vctxt->elemInfos[i]; in xmlSchemaClearValidCtxt()
27631 xmlSchemaClearElemInfo(vctxt, ei); in xmlSchemaClearValidCtxt()
27634 xmlSchemaItemListClear(vctxt->nodeQNames); in xmlSchemaClearValidCtxt()
27636 xmlDictFree(vctxt->dict); in xmlSchemaClearValidCtxt()
27641 vctxt->dict = xmlDictCreate(); in xmlSchemaClearValidCtxt()
27643 if (vctxt->filename != NULL) { in xmlSchemaClearValidCtxt()
27644 xmlFree(vctxt->filename); in xmlSchemaClearValidCtxt()
27645 vctxt->filename = NULL; in xmlSchemaClearValidCtxt()
27879 xmlSchemaVDocWalk(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVDocWalk() argument
27888 if (vctxt->validationRoot != NULL) in xmlSchemaVDocWalk()
27889 valRoot = vctxt->validationRoot; in xmlSchemaVDocWalk()
27891 valRoot = xmlDocGetRootElement(vctxt->doc); in xmlSchemaVDocWalk()
27897 vctxt->depth = -1; in xmlSchemaVDocWalk()
27898 vctxt->validationRoot = valRoot; in xmlSchemaVDocWalk()
27901 if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaVDocWalk()
27908 vctxt->depth++; in xmlSchemaVDocWalk()
27909 if (xmlSchemaValidatorPushElem(vctxt) == -1) in xmlSchemaVDocWalk()
27911 ielem = vctxt->inode; in xmlSchemaVDocWalk()
27923 vctxt->nbAttrInfos = 0; in xmlSchemaVDocWalk()
27931 ret = xmlSchemaValidatorPushAttribute(vctxt, in xmlSchemaVDocWalk()
27951 ret = xmlSchemaValidateElem(vctxt); in xmlSchemaVDocWalk()
27964 if ((vctxt->skipDepth != -1) && in xmlSchemaVDocWalk()
27965 (vctxt->depth >= vctxt->skipDepth)) in xmlSchemaVDocWalk()
27974 ret = xmlSchemaVPushText(vctxt, node->type, node->content, in xmlSchemaVDocWalk()
28014 if (node != vctxt->inode->node) { in xmlSchemaVDocWalk()
28019 ret = xmlSchemaValidatorPopElem(vctxt); in xmlSchemaVDocWalk()
28046 xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaPreRun() argument
28050 vctxt->err = 0; in xmlSchemaPreRun()
28051 vctxt->nberrors = 0; in xmlSchemaPreRun()
28052 vctxt->depth = -1; in xmlSchemaPreRun()
28053 vctxt->skipDepth = -1; in xmlSchemaPreRun()
28054 vctxt->xsiAssemble = 0; in xmlSchemaPreRun()
28055 vctxt->hasKeyrefs = 0; in xmlSchemaPreRun()
28057 vctxt->createIDCNodeTables = 1; in xmlSchemaPreRun()
28059 vctxt->createIDCNodeTables = 0; in xmlSchemaPreRun()
28064 if (vctxt->schema == NULL) { in xmlSchemaPreRun()
28067 vctxt->xsiAssemble = 1; in xmlSchemaPreRun()
28074 if ((vctxt->pctxt == NULL) && in xmlSchemaPreRun()
28075 (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1)) in xmlSchemaPreRun()
28077 pctxt = vctxt->pctxt; in xmlSchemaPreRun()
28082 vctxt->schema = xmlSchemaNewSchema(pctxt); in xmlSchemaPreRun()
28083 if (vctxt->schema == NULL) in xmlSchemaPreRun()
28091 pctxt->constructor->mainSchema = vctxt->schema; in xmlSchemaPreRun()
28101 xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt); in xmlSchemaPreRun()
28107 xmlSchemaPostRun(xmlSchemaValidCtxtPtr vctxt) { in xmlSchemaPostRun() argument
28108 if (vctxt->xsiAssemble) { in xmlSchemaPostRun()
28109 if (vctxt->schema != NULL) { in xmlSchemaPostRun()
28110 xmlSchemaFree(vctxt->schema); in xmlSchemaPostRun()
28111 vctxt->schema = NULL; in xmlSchemaPostRun()
28114 xmlSchemaClearValidCtxt(vctxt); in xmlSchemaPostRun()
28118 xmlSchemaVStart(xmlSchemaValidCtxtPtr vctxt) in xmlSchemaVStart() argument
28122 if (xmlSchemaPreRun(vctxt) < 0) in xmlSchemaVStart()
28125 if (vctxt->doc != NULL) { in xmlSchemaVStart()
28129 ret = xmlSchemaVDocWalk(vctxt); in xmlSchemaVStart()
28131 } else if (vctxt->reader != NULL) { in xmlSchemaVStart()
28136 ret = xmlSchemaVReaderWalk(vctxt); in xmlSchemaVStart()
28139 } else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) { in xmlSchemaVStart()
28143 ret = xmlParseDocument(vctxt->parserCtxt); in xmlSchemaVStart()
28150 xmlSchemaPostRun(vctxt); in xmlSchemaVStart()
28152 ret = vctxt->err; in xmlSchemaVStart()
28743 xmlSchemaValidateSetLocator(xmlSchemaValidCtxtPtr vctxt, in xmlSchemaValidateSetLocator() argument
28747 if (vctxt == NULL) return; in xmlSchemaValidateSetLocator()
28748 vctxt->locFunc = f; in xmlSchemaValidateSetLocator()
28749 vctxt->locCtxt = ctxt; in xmlSchemaValidateSetLocator()