Diff for /Amaya/amaya/templates.c between versions 1.203 and 1.204

version 1.203, 2008/09/29 10:43:00 version 1.204, 2008/09/29 13:13:23
Line 1663  void CreateTemplateFromDocument(Document Line 1663  void CreateTemplateFromDocument(Document
 #ifdef TEMPLATES  #ifdef TEMPLATES
   char buffer[MAX_LENGTH], suffix[10];    char buffer[MAX_LENGTH], suffix[10];
   
   // removet the current suffix    if (IsW3Path (DocumentURLs[doc]) &&
   strcpy (buffer, DocumentURLs[doc]);  
   TtaExtractSuffix (buffer, suffix);  
   if (suffix[0] == EOS && IsW3Path (buffer) &&  
       DocumentMeta[doc] && DocumentMeta[doc]->content_location)        DocumentMeta[doc] && DocumentMeta[doc]->content_location)
     // use the location instead of the current URI      // use the location instead of the current URI
     strcpy (buffer, DocumentMeta[doc]->content_location);      strcpy (buffer, DocumentMeta[doc]->content_location);
     else
       strcpy (buffer, DocumentURLs[doc]);
   
     // remove the current suffix
     TtaExtractSuffix (buffer, suffix);
   // the new suffix    // the new suffix
   strcat(buffer, ".xtd");    strcat(buffer, ".xtd");
   DontReplaceOldDoc = TRUE;    DontReplaceOldDoc = TRUE;
   CreateTemplate(doc, buffer);    CreateTemplate(doc, buffer);
     // by default .xtd files are xml files
     TtaSetDocumentCharset (doc, UTF_8, FALSE);
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
 }  }
   
Line 2420  Element Template_CreateComponentFromSele Line 2424  Element Template_CreateComponentFromSele
   int         sz = 128;    int         sz = 128;
   
   const char *title = TtaGetMessage (AMAYA, AM_TEMPLATE_NEWCOMP);    const char *title = TtaGetMessage (AMAYA, AM_TEMPLATE_NEWCOMP);
   const char *label = TtaGetMessage (AMAYA, AM_TEMPLATE_LABEL);    const char *label = TtaGetMessage (AMAYA, AM_NAME);
   
   if(doc && t && TtaGetDocumentAccessMode(doc) &&    if(doc && t && TtaGetDocumentAccessMode(doc) &&
       TtaGetDocumentAccessMode(doc) && sstempl &&        TtaGetDocumentAccessMode(doc) && sstempl &&

Removed from v.1.203  
changed lines
  Added in v.1.204


Webmaster