| 8697 | */ |
| 8698 | |
| 8699 | static const xmlChar * |
| 8700 | xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name, |
| 8701 | xmlChar const *prefix) { |
| 8702 | const xmlChar *cmp; |
| 8703 | const xmlChar *in; |
| 8704 | const xmlChar *ret; |
| 8705 | const xmlChar *prefix2; |
| 8706 | |
| 8707 | if (prefix == NULL) return(xmlParseNameAndCompare(ctxt, name)); |
| 8708 | |
| 8709 | GROW; |
| 8710 | in = ctxt->input->cur; |
| 8711 | |
| 8712 | cmp = prefix; |
| 8713 | while (*in != 0 && *in == *cmp) { |
| 8714 | ++in; |
| 8715 | ++cmp; |
| 8716 | } |
| 8717 | if ((*cmp == 0) && (*in == ':')) { |
| 8718 | in++; |
| 8719 | cmp = name; |
| 8720 | while (*in != 0 && *in == *cmp) { |
| 8721 | ++in; |
| 8722 | ++cmp; |
| 8723 | } |
| 8724 | if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) { |
| 8725 | /* success */ |
| 8726 | ctxt->input->col += in - ctxt->input->cur; |
| 8727 | ctxt->input->cur = in; |
| 8728 | return((const xmlChar*) 1); |
| 8729 | } |
| 8730 | } |
| 8731 | /* |
| 8732 | * all strings coms from the dictionary, equality can be done directly |
| 8733 | */ |
| 8734 | ret = xmlParseQName (ctxt, &prefix2); |
| 8735 | if (ret == NULL) |
| 8736 | return(NULL); |
| 8737 | if ((ret == name) && (prefix == prefix2)) |
| 8738 | return((const xmlChar*) 1); |
| 8739 | return ret; |
| 8740 | } |
| 8741 | |
| 8742 | /** |
| 8743 | * xmlParseAttribute2: |
no test coverage detected