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

Function xmlValidateNmtokenValueInternal

ThirdParty/libxml2/vtklibxml2/valid.c:3454–3477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3452 */
3453
3454static int
3455xmlValidateNmtokenValueInternal(xmlDocPtr doc, const xmlChar *value) {
3456 const xmlChar *cur;
3457 int val, len;
3458
3459 if (value == NULL) return(0);
3460 cur = value;
3461 val = xmlStringCurrentChar(NULL, cur, &len);
3462 cur += len;
3463
3464 if (!xmlIsDocNameChar(doc, val))
3465 return(0);
3466
3467 val = xmlStringCurrentChar(NULL, cur, &len);
3468 cur += len;
3469 while (xmlIsDocNameChar(doc, val)) {
3470 val = xmlStringCurrentChar(NULL, cur, &len);
3471 cur += len;
3472 }
3473
3474 if (val != 0) return(0);
3475
3476 return(1);
3477}
3478
3479/**
3480 * xmlValidateNmtokenValue:

Callers 2

xmlValidateNmtokenValueFunction · 0.85

Calls 2

xmlStringCurrentCharFunction · 0.85
xmlIsDocNameCharFunction · 0.85

Tested by

no test coverage detected