* xmlParserNsLookupSax: * @ctxt: parser context * @prefix: namespace prefix * * Lookup extra data for the given prefix. This returns data stored * with xmlParserNsUdpateSax. * * Returns the data on success, NULL if no namespace was found. */
| 1610 | * Returns the data on success, NULL if no namespace was found. |
| 1611 | */ |
| 1612 | void * |
| 1613 | xmlParserNsLookupSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix) { |
| 1614 | xmlHashedString hprefix; |
| 1615 | int nsIndex; |
| 1616 | |
| 1617 | if (prefix == ctxt->str_xml) |
| 1618 | return(NULL); |
| 1619 | |
| 1620 | hprefix.name = prefix; |
| 1621 | if (prefix != NULL) |
| 1622 | hprefix.hashValue = xmlDictComputeHash(ctxt->dict, prefix); |
| 1623 | else |
| 1624 | hprefix.hashValue = 0; |
| 1625 | nsIndex = xmlParserNsLookup(ctxt, &hprefix, NULL); |
| 1626 | if ((nsIndex == INT_MAX) || (nsIndex < ctxt->nsdb->minNsIndex)) |
| 1627 | return(NULL); |
| 1628 | |
| 1629 | return(ctxt->nsdb->extra[nsIndex].saxData); |
| 1630 | } |
| 1631 | |
| 1632 | /** |
| 1633 | * xmlParserNsUpdateSax: |
no test coverage detected