MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPathParseNCName

Function xmlXPathParseNCName

ThirdParty/libxml2/vtklibxml2/xpath.c:8784–8819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8782 */
8783
8784xmlChar *
8785xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) {
8786 const xmlChar *in;
8787 xmlChar *ret;
8788 int count = 0;
8789
8790 if ((ctxt == NULL) || (ctxt->cur == NULL)) return(NULL);
8791 /*
8792 * Accelerator for simple ASCII names
8793 */
8794 in = ctxt->cur;
8795 if (((*in >= 0x61) && (*in <= 0x7A)) ||
8796 ((*in >= 0x41) && (*in <= 0x5A)) ||
8797 (*in == '_')) {
8798 in++;
8799 while (((*in >= 0x61) && (*in <= 0x7A)) ||
8800 ((*in >= 0x41) && (*in <= 0x5A)) ||
8801 ((*in >= 0x30) && (*in <= 0x39)) ||
8802 (*in == '_') || (*in == '.') ||
8803 (*in == '-'))
8804 in++;
8805 if ((*in == ' ') || (*in == '>') || (*in == '/') ||
8806 (*in == '[') || (*in == ']') || (*in == ':') ||
8807 (*in == '@') || (*in == '*')) {
8808 count = in - ctxt->cur;
8809 if (count == 0)
8810 return(NULL);
8811 ret = xmlStrndup(ctxt->cur, count);
8812 if (ret == NULL)
8813 xmlXPathPErrMemory(ctxt);
8814 ctxt->cur = in;
8815 return(ret);
8816 }
8817 }
8818 return(xmlXPathParseNameComplex(ctxt, 0));
8819}
8820
8821
8822/**

Callers 4

xmlXPathParseQNameFunction · 0.85
xmlXPathCompNodeTestFunction · 0.85
xmlXPathCompStepFunction · 0.85
xmlXPtrEvalXPtrPartFunction · 0.85

Calls 3

xmlStrndupFunction · 0.85
xmlXPathPErrMemoryFunction · 0.85
xmlXPathParseNameComplexFunction · 0.85

Tested by

no test coverage detected