Diff for /Amaya/amaya/templateUtils.c between versions 1.27 and 1.28

version 1.27, 2008/05/30 08:48:37 version 1.28, 2008/06/19 16:06:47
Line 270  ThotBool ValidateTemplateAttrInMenu (Not Line 270  ThotBool ValidateTemplateAttrInMenu (Not
                          type = TtaGetAttributeValue(attr);                           type = TtaGetAttributeValue(attr);
                        else                         else
                          type = Template_ATTR_type_VAL_string;                           type = Template_ATTR_type_VAL_string;
 #ifdef AMAYA_DEBUG  
 #ifdef EK  
 /******************************************************************************/  
                        printf("Attribute : %s \n", attrName);  
                        switch(useAt)  
                        {  
                          case Template_ATTR_useAt_VAL_required:  
                            printf("    required");  
                            break;  
                          case Template_ATTR_useAt_VAL_optional:  
                            printf("    optional");  
                            break;  
                          case Template_ATTR_useAt_VAL_prohibited:  
                            printf("    prohibited");  
                            break;  
                          default:  
                            printf("    error");  
                            break;  
                        }  
                        switch(type)  
                        {  
                          case Template_ATTR_type_VAL_string:  
                            printf(" string\n");  
                            break;  
                          case Template_ATTR_type_VAL_number:  
                            printf(" number\n");  
                            break;  
                          case Template_ATTR_type_VAL_listVal:  
                            printf(" list\n");  
                            break;  
                          default:  
                            printf(" error\n");  
                            break;  
                        }  
 /******************************************************************************/  
 #endif  /* EK */  
 #endif /* AMAYA_DEBUG */  
                        event->restr.RestrType = (RestrictionContentType)type;                         event->restr.RestrType = (RestrictionContentType)type;
                        /* If attr is prohibited, dont show it.*/                         /* If attr is prohibited, dont show it.*/
                        if(useAt==Template_ATTR_useAt_VAL_prohibited)                         if(useAt==Template_ATTR_useAt_VAL_prohibited)
Line 399  void DumpElementPath(Element el) Line 362  void DumpElementPath(Element el)
 void DumpTemplateElement(Element el, Document doc)  void DumpTemplateElement(Element el, Document doc)
 {  {
 #ifdef AMAYA_DEBUG  #ifdef AMAYA_DEBUG
   ElementType elType;    ElementType    elType;
   SSchema     schema = TtaGetSSchema ("Template", doc);    AttributeType  attType;
   char*       str;    Attribute      att;
   char        buffer[MAX_LENGTH];    SSchema        schema = TtaGetSSchema ("Template", doc);
   int         len;    char*          str;
   Language    lang;    char           buffer[MAX_LENGTH];
     int            len;
     Language       lang;
       
   if(el && doc)    if(el && doc)
     {      {
Line 464  void DumpTemplateElement(Element el, Doc Line 429  void DumpTemplateElement(Element el, Doc
                 printf(" maxOccurs=%s", str);                  printf(" maxOccurs=%s", str);
                 TtaFreeMemory(str);                  TtaFreeMemory(str);
                 break;                  break;
               case Template_EL_option:  
                 str = GetAttributeStringValueFromNum(el, Template_ATTR_title, NULL);  
                 printf(" label=%s", str);  
                 TtaFreeMemory(str);  
                 break;  
               case Template_EL_useSimple:                case Template_EL_useSimple:
               case Template_EL_useEl:                case Template_EL_useEl:
                 str = GetAttributeStringValueFromNum(el, Template_ATTR_title, NULL);                  str = GetAttributeStringValueFromNum(el, Template_ATTR_title, NULL);
Line 477  void DumpTemplateElement(Element el, Doc Line 437  void DumpTemplateElement(Element el, Doc
                 str = GetAttributeStringValueFromNum(el, Template_ATTR_types, NULL);                  str = GetAttributeStringValueFromNum(el, Template_ATTR_types, NULL);
                 printf(" types=%s", str);                  printf(" types=%s", str);
                 TtaFreeMemory(str);                  TtaFreeMemory(str);
                   attType.AttrSSchema = elType.ElSSchema;
                   attType.AttrTypeNum = Template_ATTR_option;
                   att = TtaGetAttribute (el, attType);
                   if (att)
                     printf(" option");
                 break;                  break;
               case Template_EL_bag:                case Template_EL_bag:
                 str = GetAttributeStringValueFromNum(el, Template_ATTR_title, NULL);                  str = GetAttributeStringValueFromNum(el, Template_ATTR_title, NULL);

Removed from v.1.27  
changed lines
  Added in v.1.28


Webmaster