| 8615 | */ |
| 8616 | |
| 8617 | static xmlHashedString |
| 8618 | xmlParseQNameHashed(xmlParserCtxtPtr ctxt, xmlHashedString *prefix) { |
| 8619 | xmlHashedString l, p; |
| 8620 | int start, isNCName = 0; |
| 8621 | |
| 8622 | l.name = NULL; |
| 8623 | p.name = NULL; |
| 8624 | |
| 8625 | GROW; |
| 8626 | start = CUR_PTR - BASE_PTR; |
| 8627 | |
| 8628 | l = xmlParseNCName(ctxt); |
| 8629 | if (l.name != NULL) { |
| 8630 | isNCName = 1; |
| 8631 | if (CUR == ':') { |
| 8632 | NEXT; |
| 8633 | p = l; |
| 8634 | l = xmlParseNCName(ctxt); |
| 8635 | } |
| 8636 | } |
| 8637 | if ((l.name == NULL) || (CUR == ':')) { |
| 8638 | xmlChar *tmp; |
| 8639 | |
| 8640 | l.name = NULL; |
| 8641 | p.name = NULL; |
| 8642 | if ((isNCName == 0) && (CUR != ':')) |
| 8643 | return(l); |
| 8644 | tmp = xmlParseNmtoken(ctxt); |
| 8645 | if (tmp != NULL) |
| 8646 | xmlFree(tmp); |
| 8647 | l = xmlDictLookupHashed(ctxt->dict, BASE_PTR + start, |
| 8648 | CUR_PTR - (BASE_PTR + start)); |
| 8649 | if (l.name == NULL) { |
| 8650 | xmlErrMemory(ctxt); |
| 8651 | return(l); |
| 8652 | } |
| 8653 | xmlNsErr(ctxt, XML_NS_ERR_QNAME, |
| 8654 | "Failed to parse QName '%s'\n", l.name, NULL, NULL); |
| 8655 | } |
| 8656 | |
| 8657 | *prefix = p; |
| 8658 | return(l); |
| 8659 | } |
| 8660 | |
| 8661 | /** |
| 8662 | * xmlParseQName: |
no test coverage detected