Diff for /Amaya/amaya/templateInstantiate.c between versions 1.96 and 1.97

version 1.96, 2008/11/14 14:29:46 version 1.97, 2008/11/18 15:35:45
Line 350  static Element ParseTemplate (XTigerTemp Line 350  static Element ParseTemplate (XTigerTemp
                         }                          }
                       // elements are now out of the parent line                        // elements are now out of the parent line
                       savedInline = NULL;                        savedInline = NULL;
                         parentLine = NULL;
                     }                      }
   
                   // generate the currentType attribute                    // generate the currentType attribute
Line 366  static Element ParseTemplate (XTigerTemp Line 367  static Element ParseTemplate (XTigerTemp
                   else                    else
                     {                      {
                       name = (char *)GetXMLElementName (otherType, doc);                        name = (char *)GetXMLElementName (otherType, doc);
                       if (name && !strcmp (name,"???"))                        if (name && strcmp (name,"???"))
                         TtaSetAttributeText (att, name, el, doc);                          TtaSetAttributeText (att, name, el, doc);
                     }                      }
                 }                  }
Line 866  Element Template_InsertUseChildren(Docum Line 867  Element Template_InsertUseChildren(Docum
   
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
   Fix access rights.    Template_FixAccessRight fixes access rights of the el element
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 void Template_FixAccessRight (XTigerTemplate t, Element el, Document doc)  void Template_FixAccessRight (XTigerTemplate t, Element el, Document doc)
 {  {
 #ifdef TEMPLATES  #ifdef TEMPLATES
   ElementType elType;    ElementType elType;
   Element     child;    Element     child;
   char        currentType[MAX_LENGTH], *ptr;  
   Declaration decl;    Declaration decl;
     char        currentType[MAX_LENGTH], *ptr;
       
   if (t && el && doc)    if (t && el && doc)
     {      {
Line 904  void Template_FixAccessRight (XTigerTemp Line 905  void Template_FixAccessRight (XTigerTemp
                   switch (decl->nature)                    switch (decl->nature)
                     {                      {
                       case SimpleTypeNat:                        case SimpleTypeNat:
                       case XmlElementNat:  
                         TtaSetAccessRight (el, ReadWrite, doc);                          TtaSetAccessRight (el, ReadWrite, doc);
                         return;                          return;
                         case XmlElementNat:
                           child = TtaGetFirstChild (el);
                           if (child)
                             TtaSetAccessRight (child, ReadWrite, doc);
                       default:                        default:
                         TtaSetAccessRight (el, ReadOnly, doc);                          TtaSetAccessRight (el, ReadOnly, doc);
                          break;                           break;

Removed from v.1.96  
changed lines
  Added in v.1.97


Webmaster