version 1.75, 2008/05/28 08:28:13
|
version 1.76, 2008/05/30 08:48:37
|
Line 686 Element Template_InsertUseChildren(Docum
|
Line 686 Element Template_InsertUseChildren(Docum
|
ProcessAttr (dec->usedIn, newEl, doc); |
ProcessAttr (dec->usedIn, newEl, doc); |
|
|
/* Copy elements from new use to existing use. */ |
/* Copy elements from new use to existing use. */ |
|
#ifdef AMAYA_DEBUG |
DumpSubtree(newEl, doc, 0); |
DumpSubtree(newEl, doc, 0); |
while ((child = TtaGetFirstChild(newEl))) |
#endif /* AMAYA_DEBUG */ |
{ |
child = TtaGetFirstChild(newEl); |
TtaRemoveTree (child, doc); |
while (child) |
child = InsertWithNotify (child, current, el, doc); |
{ |
current = child; |
// move the new subtree to the document |
} |
TtaRemoveTree (child, doc); |
|
current = InsertWithNotify (child, current, el, doc); |
|
child = TtaGetFirstChild(newEl); |
|
} |
|
|
/* Copy currentType attribute. */ |
/* Copy currentType attribute. */ |
//attrCurrentTypeValue = GetAttributeStringValue (el, Template_ATTR_currentType, NULL); |
//attrCurrentTypeValue = GetAttributeStringValue (el, Template_ATTR_currentType, NULL); |
Line 1015 static void ParseTemplate (XTigerTemplat
|
Line 1019 static void ParseTemplate (XTigerTemplat
|
if (!t || !el) |
if (!t || !el) |
return; |
return; |
|
|
static int off = 0; |
#ifdef AMAYA_DEBUG |
|
static int off = 0; |
int i; |
int i; |
off++; |
off++; |
printf("ParseTemplate "); |
printf("ParseTemplate "); |
Line 1023 static void ParseTemplate (XTigerTemplat
|
Line 1028 static void ParseTemplate (XTigerTemplat
|
printf(" "); |
printf(" "); |
DumpTemplateElement(el, doc); |
DumpTemplateElement(el, doc); |
printf("\n"); |
printf("\n"); |
|
#endif /* AMAYA_DEBUG */ |
|
|
name = TtaGetSSchemaName (elType.ElSSchema); |
name = TtaGetSSchemaName (elType.ElSSchema); |
if (!strcmp (name, "Template")) |
if (!strcmp (name, "Template")) |
Line 1126 void DoInstanceTemplate (char *templaten
|
Line 1132 void DoInstanceTemplate (char *templaten
|
if (!t) |
if (!t) |
return; |
return; |
|
|
|
#ifdef AMAYA_DEBUG |
printf("DoInstanceTemplate %s\n", templatename); |
printf("DoInstanceTemplate %s\n", templatename); |
|
#endif /* AMAYA_DEBUG */ |
|
|
doc = GetTemplateDocument (t); |
doc = GetTemplateDocument (t); |
root = TtaGetMainRoot (doc); |
root = TtaGetMainRoot (doc); |
Line 1241 void Template_PreInstantiateComponents (
|
Line 1249 void Template_PreInstantiateComponents (
|
if (!t) |
if (!t) |
return; |
return; |
|
|
|
#ifdef AMAYA_DEBUG |
DumpAllDeclarations(); |
DumpAllDeclarations(); |
|
#endif /* AMAYA_DEBUG */ |
ForwardIterator iter = SearchSet_GetForwardIterator(GetComponents(t)); |
ForwardIterator iter = SearchSet_GetForwardIterator(GetComponents(t)); |
Declaration dec; |
Declaration dec; |
SearchSetNode node; |
SearchSetNode node; |
|
|
|
#ifdef AMAYA_DEBUG |
printf("Template_PreInstantiateComponents %s\n", t->uri); |
printf("Template_PreInstantiateComponents %s\n", t->uri); |
|
#endif /* AMAYA_DEBUG */ |
ITERATOR_FOREACH(iter, SearchSetNode, node) |
ITERATOR_FOREACH(iter, SearchSetNode, node) |
{ |
{ |
dec = (Declaration) node->elem; |
dec = (Declaration) node->elem; |