Lines Matching defs:matcher
830 xmlSchemaIDCMatcherPtr matcher; /* the correspondent field/selector
831 matcher */
1004 xmlSchemaIDCMatcherPtr idcMatcherCache; /* Cache for IDC matcher objects. */
22051 * @matcher: the IDC matcher
22054 * of the given matcher. If none found, a new one is created
22061 xmlSchemaIDCMatcherPtr matcher)
22065 ielem = vctxt->elemInfos[matcher->depth];
22068 ielem->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def);
22077 if (bind->definition == matcher->aidc->def)
22080 bind->next = xmlSchemaIDCNewBinding(matcher->aidc->def);
22093 xmlSchemaIDCMatcherPtr matcher)
22095 if (matcher->targets == NULL)
22096 matcher->targets = xmlSchemaItemListCreate();
22097 return(matcher->targets);
22150 * @matcher: the first IDC matcher in the list
22155 xmlSchemaIDCFreeMatcherList(xmlSchemaIDCMatcherPtr matcher)
22159 while (matcher != NULL) {
22160 next = matcher->next;
22161 if (matcher->keySeqs != NULL) {
22163 for (i = 0; i < matcher->sizeKeySeqs; i++)
22164 if (matcher->keySeqs[i] != NULL)
22165 xmlFree(matcher->keySeqs[i]);
22166 xmlFree(matcher->keySeqs);
22168 if (matcher->targets != NULL) {
22169 if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
22177 for (i = 0; i < matcher->targets->nbItems; i++) {
22179 (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
22184 xmlSchemaItemListFree(matcher->targets);
22186 xmlFree(matcher);
22187 matcher = next;
22194 * @matcher: the first IDC matcher in the list
22200 xmlSchemaIDCMatcherPtr matcher)
22204 while (matcher != NULL) {
22205 next = matcher->next;
22206 if (matcher->keySeqs != NULL) {
22211 for (i = 0; i < matcher->sizeKeySeqs; i++)
22212 if (matcher->keySeqs[i] != NULL) {
22213 xmlFree(matcher->keySeqs[i]);
22214 matcher->keySeqs[i] = NULL;
22217 if (matcher->targets) {
22218 if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
22226 for (i = 0; i < matcher->targets->nbItems; i++) {
22228 (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
22233 xmlSchemaItemListFree(matcher->targets);
22234 matcher->targets = NULL;
22236 matcher->next = NULL;
22238 * Cache the matcher.
22241 matcher->nextCached = vctxt->idcMatcherCache;
22242 vctxt->idcMatcherCache = matcher;
22244 matcher = next;
22251 * @matcher: the IDC matcher
22264 xmlSchemaIDCMatcherPtr matcher,
22314 sto->matcher = matcher;
22366 sto->matcher->aidc->def->name, sto->sel->xpath);
22369 sto->matcher->aidc->def->name, sto->sel->xpath);
22430 sel = sto->matcher->aidc->def->fields;
22432 if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher,
22623 WXS_BASIC_CAST sto->matcher->aidc->def,
22627 xmlSchemaGetIDCDesignation(&str, sto->matcher->aidc->def));
22639 WXS_BASIC_CAST sto->matcher->aidc->def,
22645 xmlSchemaIDCMatcherPtr matcher = sto->matcher;
22650 * The key will be anchored on the matcher's list of
22652 * by the target node's depth relative to the matcher's
22667 pos = sto->depth - matcher->depth;
22673 if (matcher->keySeqs == NULL) {
22675 matcher->sizeKeySeqs = pos * 2;
22677 matcher->sizeKeySeqs = 10;
22678 matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **)
22679 xmlMalloc(matcher->sizeKeySeqs *
22681 if (matcher->keySeqs == NULL) {
22687 memset(matcher->keySeqs, 0,
22688 matcher->sizeKeySeqs *
22690 } else if (pos >= matcher->sizeKeySeqs) {
22691 int i = matcher->sizeKeySeqs;
22693 matcher->sizeKeySeqs *= 2;
22694 matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **)
22695 xmlRealloc(matcher->keySeqs,
22696 matcher->sizeKeySeqs *
22698 if (matcher->keySeqs == NULL) {
22708 for (; i < matcher->sizeKeySeqs; i++)
22709 matcher->keySeqs[i] = NULL;
22715 keySeq = matcher->keySeqs[pos];
22732 WXS_BASIC_CAST matcher->aidc->def,
22736 xmlSchemaGetIDCDesignation(&str, matcher->aidc->def));
22748 matcher->aidc->def->nbFields *
22755 memset(keySeq, 0, matcher->aidc->def->nbFields *
22757 matcher->keySeqs[pos] = keySeq;
22769 matcher->keySeqs[pos] = NULL;
22793 xmlSchemaIDCMatcherPtr matcher;
22808 matcher = sto->matcher;
22809 idc = matcher->aidc->def;
22811 pos = depth - matcher->depth;
22813 * Check if the matcher has any key-sequences at all, plus
22816 if ((matcher->keySeqs == NULL) ||
22817 (matcher->sizeKeySeqs <= pos)) {
22824 keySeq = &(matcher->keySeqs[pos]);
22856 * Get the IDC binding from the matcher and check for
22860 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
22862 targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher);
23050 xmlSchemaIDCMatcherPtr matcher, last = NULL;
23123 * Create an IDC matcher for every IDC definition.
23127 * Reuse a cached matcher.
23129 matcher = vctxt->idcMatcherCache;
23130 vctxt->idcMatcherCache = matcher->nextCached;
23131 matcher->nextCached = NULL;
23133 matcher = (xmlSchemaIDCMatcherPtr)
23135 if (matcher == NULL) {
23137 "allocating an IDC matcher", NULL);
23140 memset(matcher, 0, sizeof(xmlSchemaIDCMatcher));
23143 vctxt->inode->idcMatchers = matcher;
23145 last->next = matcher;
23146 last = matcher;
23148 matcher->type = IDC_MATCHER;
23149 matcher->depth = vctxt->depth;
23150 matcher->aidc = aidc;
23151 matcher->idcType = aidc->def->type;
23153 xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n");
23158 if (xmlSchemaIDCAddStateObject(vctxt, matcher,
23176 xmlSchemaIDCMatcherPtr matcher = ielem->idcMatchers;
23178 while (matcher != NULL) {
23182 if ((matcher->aidc->def->type == XML_SCHEMA_TYPE_IDC_KEYREF) ||
23183 WXS_ILIST_IS_EMPTY(matcher->targets))
23185 matcher = matcher->next;
23193 ((matcher->aidc->keyrefDepth == -1) ||
23194 (matcher->aidc->keyrefDepth > vctxt->depth)))
23196 matcher = matcher->next;
23202 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
23222 (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;
23223 bind->sizeNodes = matcher->targets->sizeItems;
23224 bind->nbNodes = matcher->targets->nbItems;
23226 matcher->targets->items = NULL;
23227 matcher->targets->sizeItems = 0;
23228 matcher->targets->nbItems = 0;
23233 nbTargets = matcher->targets->nbItems;
23234 targets = (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;
23235 nbFields = matcher->aidc->def->nbFields;
23344 matcher = matcher->next;
23659 xmlSchemaIDCMatcherPtr matcher;
23662 matcher = vctxt->inode->idcMatchers;
23666 while (matcher != NULL) {
23667 if ((matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) &&
23668 matcher->targets &&
23669 matcher->targets->nbItems)
23675 nbFields = matcher->aidc->def->nbFields;
23682 if ((xmlSchemaIDCPtr) matcher->aidc->def->ref->item ==
23691 for (i = 0; i < matcher->targets->nbItems; i++) {
23693 refNode = matcher->targets->items[i];
23737 (xmlSchemaTypePtr) matcher->aidc->def,
23743 matcher->aidc->def));
23756 (xmlSchemaTypePtr) matcher->aidc->def,
23760 xmlSchemaGetComponentQName(&strB, matcher->aidc->def));
23766 matcher = matcher->next;
27393 xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp;
27395 while (matcher) {
27396 tmp = matcher;
27397 matcher = matcher->nextCached;