Diff for /XML/SAX.c between versions 1.64 and 1.65

version 1.64, 2000/06/26 07:32:33 version 1.65, 2000/06/26 13:18:58
Line 653  attribute(void *ctx, const xmlChar *full Line 653  attribute(void *ctx, const xmlChar *full
     /*      /*
      * Do the last stave of the attribute normalization       * Do the last stave of the attribute normalization
      */       */
     nval = xmlValidNormalizeAttributeValue(ctxt->myDoc,      if (ctxt->html)
           nval = NULL;
       else
           nval = xmlValidNormalizeAttributeValue(ctxt->myDoc,
                                ctxt->node, fullname, value);                                 ctxt->node, fullname, value);
     if (nval != NULL)      if (nval != NULL)
         value = nval;          value = nval;
Line 661  attribute(void *ctx, const xmlChar *full Line 664  attribute(void *ctx, const xmlChar *full
     /*      /*
      * Check whether it's a namespace definition       * Check whether it's a namespace definition
      */       */
     if ((ns == NULL) &&      if ((!ctxt->html) && (ns == NULL) &&
         (name[0] == 'x') && (name[1] == 'm') && (name[2] == 'l') &&          (name[0] == 'x') && (name[1] == 'm') && (name[2] == 'l') &&
         (name[3] == 'n') && (name[4] == 's') && (name[5] == 0)) {          (name[3] == 'n') && (name[4] == 's') && (name[5] == 0)) {
         xmlURIPtr uri;          xmlURIPtr uri;
Line 688  attribute(void *ctx, const xmlChar *full Line 691  attribute(void *ctx, const xmlChar *full
             xmlFree(nval);              xmlFree(nval);
         return;          return;
     }      }
     if ((ns != NULL) && (ns[0] == 'x') && (ns[1] == 'm') && (ns[2] == 'l') &&      if ((!ctxt->html) &&
           (ns != NULL) && (ns[0] == 'x') && (ns[1] == 'm') && (ns[2] == 'l') &&
         (ns[3] == 'n') && (ns[4] == 's') && (ns[5] == 0)) {          (ns[3] == 'n') && (ns[4] == 's') && (ns[5] == 0)) {
         /*          /*
          * Validate also for namespace decls, they are attributes from           * Validate also for namespace decls, they are attributes from
Line 730  attribute(void *ctx, const xmlChar *full Line 734  attribute(void *ctx, const xmlChar *full
                     ret->last = tmp;                      ret->last = tmp;
                 tmp = tmp->next;                  tmp = tmp->next;
             }              }
         } else {          } else if (value != NULL) {
             ret->children = xmlNewDocText(ctxt->myDoc, value);              ret->children = xmlNewDocText(ctxt->myDoc, value);
             ret->last = ret->children;              ret->last = ret->children;
             if (ret->children != NULL)              if (ret->children != NULL)
Line 738  attribute(void *ctx, const xmlChar *full Line 742  attribute(void *ctx, const xmlChar *full
         }          }
     }      }
   
     if (ctxt->validate && ctxt->wellFormed &&      if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
         ctxt->myDoc && ctxt->myDoc->intSubset) {          ctxt->myDoc && ctxt->myDoc->intSubset) {
                   
         /*          /*
Line 881  startElement(void *ctx, const xmlChar *f Line 885  startElement(void *ctx, const xmlChar *f
         i = 0;          i = 0;
         att = atts[i++];          att = atts[i++];
         value = atts[i++];          value = atts[i++];
         while ((att != NULL) && (value != NULL)) {          if (!ctxt->html) {
             if ((att[0] == 'x') && (att[1] == 'm') && (att[2] == 'l'))              while ((att != NULL) && (value != NULL)) {
                 attribute(ctxt, att, value);                  if ((att[0] == 'x') && (att[1] == 'm') && (att[2] == 'l'))
                       attribute(ctxt, att, value);
   
             att = atts[i++];                  att = atts[i++];
             value = atts[i++];                  value = atts[i++];
               }
         }          }
     }      }
   
Line 906  startElement(void *ctx, const xmlChar *f Line 912  startElement(void *ctx, const xmlChar *f
         i = 0;          i = 0;
         att = atts[i++];          att = atts[i++];
         value = atts[i++];          value = atts[i++];
         while ((att != NULL) && (value != NULL)) {          if (ctxt->html) {
             if ((att[0] != 'x') || (att[1] != 'm') || (att[2] != 'l'))              while (att != NULL) {
                 attribute(ctxt, att, value);                  attribute(ctxt, att, value);
                   att = atts[i++];
             /*                  value = atts[i++];
              * Next ones              }
              */          } else {
             att = atts[i++];              while ((att != NULL) && (value != NULL)) {
             value = atts[i++];                  if ((att[0] != 'x') || (att[1] != 'm') || (att[2] != 'l'))
                       attribute(ctxt, att, value);
   
                   /*
                    * Next ones
                    */
                   att = atts[i++];
                   value = atts[i++];
               }
         }          }
     }      }
   

Removed from v.1.64  
changed lines
  Added in v.1.65


Webmaster