20 #include "stringManipulate.h"
23 #define TREE_TABLE_ENTRY_COUNT 200
27 #define LOOKUP_SUPER_TYPE 2
28 #define LOOKUP_SUBSTITUTION 3
36 #define MAX_INCLUDE_COUNT 50
58 boolean treeTfound =
FALSE;
61 unsigned int bufCount = 0;
65 unsigned int includeCnt, tmpInclCnt;
68 for(i = 0; i < *count; i++)
71 for (g = 0; g < (*treeT)[i].count; ++g)
82 includeTblIndex[includeCnt] = g;
88 for(j = 0; j < *count; j++)
97 if(treeTfound ==
FALSE)
102 &bufCount, &schemaFormat, &options));
115 for(n = *count; n < *count + bufCount; n++)
120 for(n = *count; n < *count + bufCount; n++)
125 *count = (*count + bufCount);
149 for(j = 0; j < *count; j++)
151 if(j != i &&
stringEqual((*treeT)[i].globalDefs.targetNs, (*treeT)[j].globalDefs.targetNs))
154 if(tmpInclCnt < includeCnt)
164 if(treeTfound ==
FALSE)
168 for(j = tmpInclCnt; j < includeCnt; j++)
171 &bufCount, &schemaFormat, &options));
184 for(n = *count; n < *count + bufCount; n++)
189 for(n = *count; n < *count + bufCount; n++)
194 *count = (*count + bufCount);
246 if(treeT->typeTbl ==
NULL)
250 if(treeT->elemTbl ==
NULL)
254 if(treeT->attrTbl ==
NULL)
258 if(treeT->groupTbl ==
NULL)
262 if(treeT->attrGroupTbl ==
NULL)
275 if(treeT->typeTbl !=
NULL)
278 if(treeT->elemTbl !=
NULL)
281 if(treeT->attrTbl !=
NULL)
284 if(treeT->groupTbl !=
NULL)
287 if(treeT->attrGroupTbl !=
NULL)
300 for(i = 0; i < count; i++)
303 for(j = 0; j < treeT[i].
count; j++)
309 #if DEBUG_GRAMMAR_GEN == ON && EXIP_DEBUG_LEVEL == INFO
311 printString(&treeT[i].tree[j].attributePointers[ATTRIBUTE_SUBSTITUTION_GROUP]);
316 TRY(lookupGlobalDefinition(schema, treeT, count, i, &treeT[i].tree[j].attributePointers[ATTRIBUTE_SUBSTITUTION_GROUP],
LOOKUP_SUBSTITUTION, &treeT[i].tree[j], subsTbl));
319 TRY(resolveEntry(schema, treeT, count, i, &treeT[i].tree[j]));
332 TRY(resolveEntry(schema, treeT, count, currTreeT, entry->
child.
entry));
338 TRY(resolveEntry(schema, treeT, count, currTreeT, entry->
next));
399 for(i = 0; i < count; i++)
405 if(treeT[i].typeTbl !=
NULL && treeT[i].elemTbl !=
NULL && treeT[i].attrTbl !=
NULL &&
406 treeT[i].groupTbl !=
NULL && treeT[i].attrGroupTbl !=
NULL)
424 for(j = 0; j < treeT[i].
count; j++)
451 if(typeQnameID.
uriId == 0 || typeQnameID.
uriId > 3)
474 boolean isHeadFound =
FALSE;
480 for(s = 0; s < subsTbl->
count; s++)
493 newHead.
headId = typeQnameID;
500 qEntry.
treeT = &treeT[currTreeT];
501 qEntry.
entry = entry;
520 boolean pfxFound =
FALSE;
536 uriStr.
str = typeLiteral.
str;
568 lnStr.
str = typeLiteral.
str + indx + 1;
595 lnStr.
str = typeLiteral.
str;
639 for (i = 0; i < treeT->
count; ++i)
676 attrNamespece.
str = nsList.
str;
683 tmpNS.
str = attrNamespece.
str;
696 attrNamespece.
length = attrNamespece.
length - sChIndex - 1;
697 attrNamespece.
str = attrNamespece.
str + sChIndex + 1;