Diff for /Amaya/amaya/XHTMLbuilder.c between versions 1.110 and 1.111

version 1.110, 2004/09/23 14:13:46 version 1.111, 2004/10/19 15:30:19
Line 174  ThotBool XhtmlCannotContainText (Element Line 174  ThotBool XhtmlCannotContainText (Element
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
     ----------------------------------------------------------------------*/
   static void CheckALTAttribute (Element el, Document doc)
   {
     ElementType    elType;
     Attribute      attr;
     AttributeType  attrType;
   
      elType = TtaGetElementType (el);
      attrType.AttrSSchema = elType.ElSSchema;
      attrType.AttrTypeNum = HTML_ATTR_ALT;
      attr = TtaGetAttribute (el, attrType);
      if (attr == NULL)
        {
          if (DocumentMeta[doc] && DocumentMeta[doc]->xmlformat)
            XmlParseError (errorParsing,
                           (unsigned char *)"Default mandatory attribute \"alt\" added", 0);
          else
            HTMLParseError (doc, "Default mandatory attribute \"alt\" added");
          attr = TtaNewAttribute (attrType);
          TtaAttachAttribute (el, attr, doc);
          TtaSetAttributeText (attr, "img", el, doc);
        }
   }
   
   /*----------------------------------------------------------------------
   XhtmlElementComplete    XhtmlElementComplete
   Complete Xhtml elements.    Complete Xhtml elements.
   Check its attributes and its contents.    Check its attributes and its contents.
Line 410  void XhtmlElementComplete (ParserData *c Line 435  void XhtmlElementComplete (ParserData *c
          }           }
        if (data)         if (data)
          TtaFreeMemory (data);           TtaFreeMemory (data);
          /* Check the mandatory ALT attribute */
          CheckALTAttribute (el, doc);
        break;         break;
   
      case HTML_EL_IFRAME:         /* it's an iframe */       case HTML_EL_IFRAME:         /* it's an iframe */
Line 714  void XhtmlElementComplete (ParserData *c Line 741  void XhtmlElementComplete (ParserData *c
        break;         break;
   
      case HTML_EL_PICTURE_UNIT:       case HTML_EL_PICTURE_UNIT:
          /* Check the mandatory ALT attribute */
          CheckALTAttribute (el, doc);
        break;         break;
                 
      case HTML_EL_LINK:       case HTML_EL_LINK:
Line 982  void HTMLTypeAttrValue (char *val, Attri Line 1011  void HTMLTypeAttrValue (char *val, Attri
    Value val has been read for the HTML attribute TYPE.     Value val has been read for the HTML attribute TYPE.
    Create a child for the current Thot element INPUT accordingly.     Create a child for the current Thot element INPUT accordingly.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 void              XhtmlTypeAttrValue (char       *val,  void XhtmlTypeAttrValue (char       *val,
                                       Attribute   currentAttribute,                           Attribute   currentAttribute,
                                       Element     lastAttrElement,                           Element     lastAttrElement,
                                       ParserData *context)                           ParserData *context)
   
 {  {
   ElementType     elType;    ElementType     elType;
   Element         newChild;    Element         newChild;

Removed from v.1.110  
changed lines
  Added in v.1.111


Webmaster