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

Function xmlXPathScanName

ThirdParty/libxml2/vtklibxml2/xpath.c:9493–9523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9491 */
9492
9493static xmlChar *
9494xmlXPathScanName(xmlXPathParserContextPtr ctxt) {
9495 int l;
9496 int c;
9497 const xmlChar *cur;
9498 xmlChar *ret;
9499
9500 cur = ctxt->cur;
9501
9502 c = CUR_CHAR(l);
9503 if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
9504 (!IS_LETTER(c) && (c != '_') &&
9505 (c != ':'))) {
9506 return(NULL);
9507 }
9508
9509 while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
9510 ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
9511 (c == '.') || (c == '-') ||
9512 (c == '_') || (c == ':') ||
9513 (IS_COMBINING(c)) ||
9514 (IS_EXTENDER(c)))) {
9515 NEXTL(l);
9516 c = CUR_CHAR(l);
9517 }
9518 ret = xmlStrndup(cur, ctxt->cur - cur);
9519 if (ret == NULL)
9520 xmlXPathPErrMemory(ctxt);
9521 ctxt->cur = cur;
9522 return(ret);
9523}
9524
9525/**
9526 * xmlXPathCompPathExpr:

Callers 1

xmlXPathCompPathExprFunction · 0.85

Calls 2

xmlStrndupFunction · 0.85
xmlXPathPErrMemoryFunction · 0.85

Tested by

no test coverage detected