Diff for /XML/SAX.c between versions 1.61 and 1.62

version 1.61, 2000/05/06 18:27:23 version 1.62, 2000/05/10 18:16:38
Line 194  externalSubset(void *ctx, const xmlChar Line 194  externalSubset(void *ctx, const xmlChar
         int oldwellFormed;          int oldwellFormed;
         xmlParserInputPtr input = NULL;          xmlParserInputPtr input = NULL;
         xmlCharEncoding enc;          xmlCharEncoding enc;
           xmlCharEncoding oldcharset;
   
         /*          /*
          * Ask the Entity resolver to load the damn thing           * Ask the Entity resolver to load the damn thing
Line 215  externalSubset(void *ctx, const xmlChar Line 216  externalSubset(void *ctx, const xmlChar
         oldinputMax = ctxt->inputMax;          oldinputMax = ctxt->inputMax;
         oldinputTab = ctxt->inputTab;          oldinputTab = ctxt->inputTab;
         oldwellFormed = ctxt->wellFormed;          oldwellFormed = ctxt->wellFormed;
           oldcharset = ctxt->charset;
   
         ctxt->inputTab = (xmlParserInputPtr *)          ctxt->inputTab = (xmlParserInputPtr *)
                          xmlMalloc(5 * sizeof(xmlParserInputPtr));                           xmlMalloc(5 * sizeof(xmlParserInputPtr));
Line 228  externalSubset(void *ctx, const xmlChar Line 230  externalSubset(void *ctx, const xmlChar
             ctxt->inputNr = oldinputNr;              ctxt->inputNr = oldinputNr;
             ctxt->inputMax = oldinputMax;              ctxt->inputMax = oldinputMax;
             ctxt->inputTab = oldinputTab;              ctxt->inputTab = oldinputTab;
               ctxt->charset = oldcharset;
             return;              return;
         }          }
         ctxt->inputNr = 0;          ctxt->inputNr = 0;
Line 270  externalSubset(void *ctx, const xmlChar Line 273  externalSubset(void *ctx, const xmlChar
         ctxt->inputNr = oldinputNr;          ctxt->inputNr = oldinputNr;
         ctxt->inputMax = oldinputMax;          ctxt->inputMax = oldinputMax;
         ctxt->inputTab = oldinputTab;          ctxt->inputTab = oldinputTab;
           ctxt->charset = oldcharset;
         /* ctxt->wellFormed = oldwellFormed; */          /* ctxt->wellFormed = oldwellFormed; */
     }      }
 }  }
Line 605  endDocument(void *ctx) Line 609  endDocument(void *ctx)
         ctxt->myDoc->encoding = ctxt->encoding;          ctxt->myDoc->encoding = ctxt->encoding;
         ctxt->encoding = NULL;          ctxt->encoding = NULL;
     }      }
       if ((ctxt->inputTab[0]->encoding != NULL) && (ctxt->myDoc != NULL) &&
           (ctxt->myDoc->encoding == NULL)) {
           ctxt->myDoc->encoding = xmlStrdup(ctxt->inputTab[0]->encoding);
       }
       if ((ctxt->charset != XML_CHAR_ENCODING_NONE) && (ctxt->myDoc != NULL) &&
           (ctxt->myDoc->charset == XML_CHAR_ENCODING_NONE)) {
           ctxt->myDoc->charset = ctxt->charset;
       }
 }  }
   
 /**  /**
Line 1025  characters(void *ctx, const xmlChar *ch, Line 1037  characters(void *ctx, const xmlChar *ch,
 #ifdef DEBUG_SAX_TREE  #ifdef DEBUG_SAX_TREE
     fprintf(stderr, "add chars to %s \n", ctxt->node->name);      fprintf(stderr, "add chars to %s \n", ctxt->node->name);
 #endif  #endif
   
       /*
        * Here we needed an accelerator mechanism in case of very large
        * elements. Use an attribute in the structure !!!
        */
     if (lastChild == NULL)      if (lastChild == NULL)
         xmlNodeAddContentLen(ctxt->node, ch, len);          xmlNodeAddContentLen(ctxt->node, ch, len);
     else {      else {
         if (xmlNodeIsText(lastChild))          if (xmlNodeIsText(lastChild)) {
             xmlTextConcat(lastChild, ch, len);              xmlTextConcat(lastChild, ch, len);
         else {          } else {
             lastChild = xmlNewTextLen(ch, len);              lastChild = xmlNewTextLen(ch, len);
             xmlAddChild(ctxt->node, lastChild);              xmlAddChild(ctxt->node, lastChild);
         }          }

Removed from v.1.61  
changed lines
  Added in v.1.62


Webmaster