[xml] Bug in parser.c ?



In parser.c:

xmlChar *
xmlParseName(xmlParserCtxtPtr ctxt) {
    const xmlChar *in;
    xmlChar *ret;
    int count = 0;

    GROW;

    /*
     * Accelerator for simple ASCII names
     */
    in = ctxt->input->cur;
    if (((*in >= 0x61) && (*in <= 0x7A)) ||
 ((*in >= 0x41) && (*in <= 0x5A)) ||
 (*in == '_') || (*in == ':')) {
 in++;
 while (((*in >= 0x61) && (*in <= 0x7A)) ||
        ((*in >= 0x41) && (*in <= 0x5A)) ||
        ((*in >= 0x30) && (*in <= 0x39)) ||
        (*in == '_') || (*in == ':'))
     in++;
 if ((*in == ' ') || (*in == '>') || (*in == '/')) {
     count = in - ctxt->input->cur;
     ret = xmlStrndup(ctxt->input->cur, count);
     ctxt->input->cur = in;
     return(ret);
 }
    }
    xmlParseNameComplex(ctxt);  //why not "return xmlNameComplex(ctxt)"
?
}







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]