Lines Matching defs:idc
30 * IDC XPath expression and chameleon includes: the targetNamespace is changed, so
723 xmlSchemaIDCPtr idc;
724 int index; /* an index position if significant for IDC key-sequences */
752 * The augmented IDC information used for validation.
758 xmlSchemaIDCPtr def; /* the IDC definition */
759 int keyrefDepth; /* the lowest tree level to which IDC
799 xmlSchemaIDCPtr definition; /* the IDC definition */
841 * Used to evaluate IDC selectors (and fields).
848 xmlSchemaIDCAugPtr aidc; /* the augmented IDC item */
896 xmlSchemaPSVIIDCBindingPtr idcTable; /* the table of PSVI IDC bindings
898 xmlSchemaIDCMatcherPtr idcMatchers; /* the IDC matchers for the scope
1001 xmlSchemaIDCAugPtr aidcs; /* a list of augmented IDC informations */
1005 xmlSchemaIDCMatcherPtr idcMatcherCache; /* Cache for IDC matcher objects. */
1007 xmlSchemaPSVIIDCNodePtr *idcNodes; /* list of all IDC node-table entries*/
1011 xmlSchemaPSVIIDCKeyPtr *idcKeys; /* list of all IDC node-table entries */
1148 /* return(BAD_CAST "IDC (unique)"); */
1151 /* return(BAD_CAST "IDC (key)"); */
1154 /* return(BAD_CAST "IDC (keyref)"); */
1441 xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc)
1443 return(xmlSchemaGetComponentDesignation(buf, idc));
3896 * @idc: a identity-constraint definition
4548 * Displays the current IDC table for debug purposes.
4562 fprintf(output, "IDC: TABLES on '%s'\n",
4569 fprintf(output, "IDC: BINDING '%s' (%d)\n",
4594 fprintf(output, "IDC: dupls (%d):\n", bind->dupls->nbItems);
8006 xmlSchemaIDCPtr idc,
8021 xmlSchemaPErr(ctxt, idc->node,
8028 node = idc->node;
8223 xmlSchemaIDCPtr idc,
8274 if (xmlSchemaCheckCSelectorXPath(ctxt, idc, item, attr,
8280 "validating the XPath expression of a IDC selector.\n",
8292 * Add the annotation to the parent IDC.
8294 xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) idc,
20368 * @idc: the identity-constraint definition
20377 xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc,
20380 if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF)
20382 if (idc->ref->name != NULL) {
20383 idc->ref->item = (xmlSchemaBasicItemPtr)
20384 xmlSchemaGetIDC(pctxt->schema, idc->ref->name,
20385 idc->ref->targetNamespace);
20386 if (idc->ref->item == NULL) {
20393 WXS_BASIC_CAST idc, idc->node,
20394 "refer", idc->ref->name,
20395 idc->ref->targetNamespace,
20398 } else if (idc->ref->item->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
20404 NULL, WXS_BASIC_CAST idc,
20407 idc->ref->item = NULL;
20410 if (idc->nbFields !=
20411 ((xmlSchemaIDCPtr) idc->ref->item)->nbFields) {
20415 refer = (xmlSchemaIDCPtr) idc->ref->item;
20424 NULL, WXS_BASIC_CAST idc,
20903 * 6. IDC key-references:
20904 * - the referenced IDC 'key' or 'unique' definition
21983 * Validation of identity-constraints (IDC) *
21989 * @idcDef: the IDC definition
21991 * Creates an augmented IDC definition item.
22004 "xmlSchemaAugmentIDC: allocating an augmented IDC definition",
22029 * Creates an augmented IDC definition for the imported schema.
22041 * @idcDef: the IDC definition of this binding
22043 * Creates a new IDC binding.
22045 * Returns the new IDC binding, NULL on internal errors.
22056 "allocating a PSVI IDC binding item", NULL);
22067 * @item: the IDC node table item
22069 * The validation context is used to store IDC node table items.
22070 * They are stored to avoid copying them if IDC node-tables are merged
22071 * with corresponding parent IDC node-tables (bubbling).
22087 "allocating the IDC node table item list", NULL);
22098 "re-allocating the IDC node table item list", NULL);
22110 * @item: the IDC key
22112 * The validation context is used to store an IDC key.
22128 "allocating the IDC key storage list", NULL);
22139 "re-allocating the IDC key storage list", NULL);
22150 * @bind: the IDC binding
22153 * Appends the IDC node-table item to the binding.
22167 "allocating an array of IDC node-table items", NULL);
22177 "re-allocating an array of IDC node-table items", NULL);
22188 * @matcher: the IDC matcher
22190 * Looks up an PSVI IDC binding, for the IDC definition and
22192 * and added to the IDC table.
22194 * Returns an IDC binding or NULL on internal errors.
22239 * @key: the IDC key
22241 * Frees an IDC key together with its compiled value.
22254 * Frees an IDC binding. Note that the node table-items
22269 * @bind: the first IDC binding in the list
22271 * Frees an IDC table, i.e. all the IDC bindings in the list.
22287 * @matcher: the first IDC matcher in the list
22289 * Frees a list of IDC matchers.
22331 * @matcher: the first IDC matcher in the list
22333 * Caches a list of IDC matchers for reuse.
22388 * @matcher: the IDC matcher
22421 "allocating an IDC state object", NULL);
22456 xmlGenericError(xmlGenericErrorContext, "IDC: STO push '%s'\n",
22488 "IDC: EVAL on %s, depth %d, type %d\n",
22502 xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] selector '%s'\n",
22505 xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] field '%s'\n",
22526 xmlGenericError(xmlGenericErrorContext, "IDC: "
22553 xmlGenericError(xmlGenericErrorContext, "IDC: push match '%d'\n",
22560 * Activate state objects for the IDC fields of
22561 * the IDC selector.
22564 xmlGenericError(xmlGenericErrorContext, "IDC: "
22576 * An IDC key node was found by the IDC field.
22580 "IDC: key found\n");
22674 * Processes and pops the history items of the IDC state objects.
22675 * IDC key-sequences are validated/created on IDC bindings.
22696 "IDC: BACK on %s, depth %d\n",
22713 xmlGenericError(xmlGenericErrorContext, "IDC: stream pop '%s'\n",
22889 "allocating an IDC key-sequence", NULL);
22904 "allocating a IDC key", NULL);
22931 xmlSchemaIDCPtr idc;
22936 * An IDC 'selector' state object resolved to a target node,
22942 * itself, into the node-table of the corresponding IDC
22946 idc = matcher->aidc->def;
22947 nbKeys = idc->nbFields;
22955 if (idc->type == XML_SCHEMA_TYPE_IDC_KEY)
22963 if (idc->type == XML_SCHEMA_TYPE_IDC_KEY)
22974 if (idc->type == XML_SCHEMA_TYPE_IDC_KEY) {
22976 * All fields of a "key" IDC must resolve.
22993 * Get the IDC binding from the matcher and check for
23000 if ((idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) &&
23041 WXS_BASIC_CAST idc,
23045 xmlSchemaGetIDCDesignation(&strB, idc));
23052 * Add a node-table item to the IDC binding.
23058 "allocating an IDC node-table item", NULL);
23068 if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) {
23078 * Save a cached QName for this node on the IDC node, to be
23102 if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
23125 WXS_BASIC_CAST idc,
23127 xmlSchemaGetIDCDesignation(&str, idc), NULL);
23132 * Free the key-sequence if not added to the IDC table.
23148 xmlGenericError(xmlGenericErrorContext, "IDC: STO pop '%s'\n",
23178 * Creates helper objects to evaluate IDC selectors/fields
23188 xmlSchemaIDCPtr idc, refIdc;
23191 idc = (xmlSchemaIDCPtr) elemDecl->idcs;
23192 if (idc == NULL)
23199 "IDC: REGISTER on %s, depth %d\n",
23207 "The chain of IDC matchers is expected to be empty");
23211 if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
23215 * the depth of the top-most keyref IDC. If no keyref
23216 * references a key/unique IDC, the keyrefDepth will
23219 refIdc = (xmlSchemaIDCPtr) idc->ref->item;
23226 * Lookup the referenced augmented IDC info.
23236 "Could not find an augmented IDC item for an IDC "
23246 * Lookup the augmented IDC item for the IDC definition.
23250 if (aidc->def == idc)
23256 "Could not find an augmented IDC item for an IDC definition");
23260 * Create an IDC matcher for every IDC definition.
23274 "allocating an IDC matcher", NULL);
23290 xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n");
23296 idc->selector, XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) == -1)
23299 idc = idc->next;
23300 } while (idc != NULL);
23317 * Skip keyref IDCs and empty IDC target-lists.
23326 * If we _want_ the IDC node-table to be created in any case
23337 * Get/create the IDC binding on this element for the IDC definition.
23356 * Transfer all IDC target-nodes to the IDC node-table.
23368 * Compare the key-sequences and add to the IDC node-table.
23459 * Remove the duplicate entry from the IDC node-table.
23471 * If everything is fine, then add the IDC target-node to
23472 * the IDC node-table.
23493 * Merges IDC bindings of an element at @depth into the corresponding IDC
23503 xmlSchemaPSVIIDCBindingPtr bind; /* IDC bindings of the current node. */
23504 xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL; /* parent IDC bindings. */
23525 * Check if the key/unique IDC table needs to be bubbled.
23545 * IDC definition.
23684 "allocating IDC list of node-table items", NULL);
23695 "re-allocating IDC list of node-table items", NULL);
23712 * No binding for the IDC was found: create a new one and
23725 * Add all IDC node-table entries.
23749 "allocating an array of IDC node-table "
23793 * Check the cvc-idc-keyref constraints.
23817 * Find the IDC node-table for the referenced IDC key/unique.
24059 * REVISIT OPTIMIZE TODO: Use a pool of IDC matchers.
24070 * OPTIMIZE TODO: Use a pool of IDC tables??.
25117 * IDC: Register identity-constraint XPath matchers.
25609 * Go directly to IDC evaluation.
26403 * PSVI TODO: If we expose IDC node-tables via PSVI then the tables
26405 * We will currently build IDC node-tables and bubble them only if
26410 * Add the current IDC target-nodes to the IDC node-tables.
26419 * Validate IDC keyrefs.
26425 * Merge/free the IDC table.
26438 * Merge the IDC node table with the table of the parent node.
26446 * VAL TODO: Don't free the PSVI IDC tables if they are
26466 * A 'keyrefDepth' of a key/unique IDC matches the current
26468 * top-most keyref IDC which refers to this IDC.
26876 * Augment the IDC definitions for the main schema and all imported ones
26985 * Evaluate IDCs. Do it here, since new IDC matchers are registered
27570 * Augmented IDC information.
27692 * Augmented IDC information.
28098 * Augment the IDC definitions for the main schema and all imported ones