Lines Matching defs:matcher
830 xmlSchemaIDCMatcherPtr matcher; /* the correspondent field/selector
831 matcher */
1004 xmlSchemaIDCMatcherPtr idcMatcherCache; /* Cache for IDC matcher objects. */
22075 * @matcher: the IDC matcher
22078 * of the given matcher. If none found, a new one is created
22085 xmlSchemaIDCMatcherPtr matcher)
22089 ielem = vctxt->elemInfos[matcher->depth];
22092 ielem->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def);
22101 if (bind->definition == matcher->aidc->def)
22104 bind->next = xmlSchemaIDCNewBinding(matcher->aidc->def);
22117 xmlSchemaIDCMatcherPtr matcher)
22119 if (matcher->targets == NULL)
22120 matcher->targets = xmlSchemaItemListCreate();
22121 return(matcher->targets);
22174 * @matcher: the first IDC matcher in the list
22179 xmlSchemaIDCFreeMatcherList(xmlSchemaIDCMatcherPtr matcher)
22183 while (matcher != NULL) {
22184 next = matcher->next;
22185 if (matcher->keySeqs != NULL) {
22187 for (i = 0; i < matcher->sizeKeySeqs; i++)
22188 if (matcher->keySeqs[i] != NULL)
22189 xmlFree(matcher->keySeqs[i]);
22190 xmlFree(matcher->keySeqs);
22192 if (matcher->targets != NULL) {
22193 if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
22201 for (i = 0; i < matcher->targets->nbItems; i++) {
22203 (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
22208 xmlSchemaItemListFree(matcher->targets);
22210 xmlFree(matcher);
22211 matcher = next;
22218 * @matcher: the first IDC matcher in the list
22224 xmlSchemaIDCMatcherPtr matcher)
22228 while (matcher != NULL) {
22229 next = matcher->next;
22230 if (matcher->keySeqs != NULL) {
22235 for (i = 0; i < matcher->sizeKeySeqs; i++)
22236 if (matcher->keySeqs[i] != NULL) {
22237 xmlFree(matcher->keySeqs[i]);
22238 matcher->keySeqs[i] = NULL;
22241 if (matcher->targets) {
22242 if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
22250 for (i = 0; i < matcher->targets->nbItems; i++) {
22252 (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
22257 xmlSchemaItemListFree(matcher->targets);
22258 matcher->targets = NULL;
22260 matcher->next = NULL;
22262 * Cache the matcher.
22265 matcher->nextCached = vctxt->idcMatcherCache;
22266 vctxt->idcMatcherCache = matcher;
22268 matcher = next;
22275 * @matcher: the IDC matcher
22288 xmlSchemaIDCMatcherPtr matcher,
22338 sto->matcher = matcher;
22390 sto->matcher->aidc->def->name, sto->sel->xpath);
22393 sto->matcher->aidc->def->name, sto->sel->xpath);
22454 sel = sto->matcher->aidc->def->fields;
22456 if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher,
22647 WXS_BASIC_CAST sto->matcher->aidc->def,
22651 xmlSchemaGetIDCDesignation(&str, sto->matcher->aidc->def));
22663 WXS_BASIC_CAST sto->matcher->aidc->def,
22669 xmlSchemaIDCMatcherPtr matcher = sto->matcher;
22674 * The key will be anchored on the matcher's list of
22676 * by the target node's depth relative to the matcher's
22691 pos = sto->depth - matcher->depth;
22697 if (matcher->keySeqs == NULL) {
22699 matcher->sizeKeySeqs = pos * 2;
22701 matcher->sizeKeySeqs = 10;
22702 matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **)
22703 xmlMalloc(matcher->sizeKeySeqs *
22705 if (matcher->keySeqs == NULL) {
22711 memset(matcher->keySeqs, 0,
22712 matcher->sizeKeySeqs *
22714 } else if (pos >= matcher->sizeKeySeqs) {
22715 int i = matcher->sizeKeySeqs;
22717 matcher->sizeKeySeqs *= 2;
22718 matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **)
22719 xmlRealloc(matcher->keySeqs,
22720 matcher->sizeKeySeqs *
22722 if (matcher->keySeqs == NULL) {
22732 for (; i < matcher->sizeKeySeqs; i++)
22733 matcher->keySeqs[i] = NULL;
22739 keySeq = matcher->keySeqs[pos];
22756 WXS_BASIC_CAST matcher->aidc->def,
22760 xmlSchemaGetIDCDesignation(&str, matcher->aidc->def));
22772 matcher->aidc->def->nbFields *
22779 memset(keySeq, 0, matcher->aidc->def->nbFields *
22781 matcher->keySeqs[pos] = keySeq;
22793 matcher->keySeqs[pos] = NULL;
22817 xmlSchemaIDCMatcherPtr matcher;
22832 matcher = sto->matcher;
22833 idc = matcher->aidc->def;
22835 pos = depth - matcher->depth;
22837 * Check if the matcher has any key-sequences at all, plus
22840 if ((matcher->keySeqs == NULL) ||
22841 (matcher->sizeKeySeqs <= pos)) {
22848 keySeq = &(matcher->keySeqs[pos]);
22880 * Get the IDC binding from the matcher and check for
22884 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
22886 targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher);
23074 xmlSchemaIDCMatcherPtr matcher, last = NULL;
23147 * Create an IDC matcher for every IDC definition.
23151 * Reuse a cached matcher.
23153 matcher = vctxt->idcMatcherCache;
23154 vctxt->idcMatcherCache = matcher->nextCached;
23155 matcher->nextCached = NULL;
23157 matcher = (xmlSchemaIDCMatcherPtr)
23159 if (matcher == NULL) {
23161 "allocating an IDC matcher", NULL);
23164 memset(matcher, 0, sizeof(xmlSchemaIDCMatcher));
23167 vctxt->inode->idcMatchers = matcher;
23169 last->next = matcher;
23170 last = matcher;
23172 matcher->type = IDC_MATCHER;
23173 matcher->depth = vctxt->depth;
23174 matcher->aidc = aidc;
23175 matcher->idcType = aidc->def->type;
23177 xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n");
23182 if (xmlSchemaIDCAddStateObject(vctxt, matcher,
23200 xmlSchemaIDCMatcherPtr matcher = ielem->idcMatchers;
23202 while (matcher != NULL) {
23206 if ((matcher->aidc->def->type == XML_SCHEMA_TYPE_IDC_KEYREF) ||
23207 WXS_ILIST_IS_EMPTY(matcher->targets))
23209 matcher = matcher->next;
23217 ((matcher->aidc->keyrefDepth == -1) ||
23218 (matcher->aidc->keyrefDepth > vctxt->depth)))
23220 matcher = matcher->next;
23226 bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
23246 (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;
23247 bind->sizeNodes = matcher->targets->sizeItems;
23248 bind->nbNodes = matcher->targets->nbItems;
23250 matcher->targets->items = NULL;
23251 matcher->targets->sizeItems = 0;
23252 matcher->targets->nbItems = 0;
23257 nbTargets = matcher->targets->nbItems;
23258 targets = (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;
23259 nbFields = matcher->aidc->def->nbFields;
23368 matcher = matcher->next;
23683 xmlSchemaIDCMatcherPtr matcher;
23686 matcher = vctxt->inode->idcMatchers;
23690 while (matcher != NULL) {
23691 if ((matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) &&
23692 matcher->targets &&
23693 matcher->targets->nbItems)
23699 nbFields = matcher->aidc->def->nbFields;
23706 if ((xmlSchemaIDCPtr) matcher->aidc->def->ref->item ==
23715 for (i = 0; i < matcher->targets->nbItems; i++) {
23717 refNode = matcher->targets->items[i];
23761 (xmlSchemaTypePtr) matcher->aidc->def,
23767 matcher->aidc->def));
23780 (xmlSchemaTypePtr) matcher->aidc->def,
23784 xmlSchemaGetComponentQName(&strB, matcher->aidc->def));
23790 matcher = matcher->next;
27417 xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp;
27419 while (matcher) {
27420 tmp = matcher;
27421 matcher = matcher->nextCached;