MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlSchemaAddRedef

Function xmlSchemaAddRedef

ThirdParty/libxml2/vtklibxml2/xmlschemas.c:5194–5221  ·  view source on GitHub ↗

* xmlSchemaAddRedef: * * Adds a redefinition information. This is used at a later stage to: * resolve references to the redefined components and to check constraints. */

Source from the content-addressed store, hash-verified

5192* resolve references to the redefined components and to check constraints.
5193*/
5194static xmlSchemaRedefPtr
5195xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt,
5196 xmlSchemaBucketPtr targetBucket,
5197 void *item,
5198 const xmlChar *refName,
5199 const xmlChar *refTargetNs)
5200{
5201 xmlSchemaRedefPtr ret;
5202
5203 ret = (xmlSchemaRedefPtr)
5204 xmlMalloc(sizeof(xmlSchemaRedef));
5205 if (ret == NULL) {
5206 xmlSchemaPErrMemory(pctxt);
5207 return (NULL);
5208 }
5209 memset(ret, 0, sizeof(xmlSchemaRedef));
5210 ret->item = item;
5211 ret->targetBucket = targetBucket;
5212 ret->refName = refName;
5213 ret->refTargetNs = refTargetNs;
5214 if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL)
5215 WXS_CONSTRUCTOR(pctxt)->redefs = ret;
5216 else
5217 WXS_CONSTRUCTOR(pctxt)->lastRedef->next = ret;
5218 WXS_CONSTRUCTOR(pctxt)->lastRedef = ret;
5219
5220 return (ret);
5221}
5222
5223/**
5224 * xmlSchemaAddAttributeGroupDefinition:

Callers 3

xmlSchemaAddTypeFunction · 0.85

Calls 1

xmlSchemaPErrMemoryFunction · 0.85

Tested by

no test coverage detected