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

Function xmlValidateNameValueInternal

ThirdParty/libxml2/vtklibxml2/valid.c:3336–3358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3334 */
3335
3336static int
3337xmlValidateNameValueInternal(xmlDocPtr doc, const xmlChar *value) {
3338 const xmlChar *cur;
3339 int val, len;
3340
3341 if (value == NULL) return(0);
3342 cur = value;
3343 val = xmlStringCurrentChar(NULL, cur, &len);
3344 cur += len;
3345 if (!xmlIsDocNameStartChar(doc, val))
3346 return(0);
3347
3348 val = xmlStringCurrentChar(NULL, cur, &len);
3349 cur += len;
3350 while (xmlIsDocNameChar(doc, val)) {
3351 val = xmlStringCurrentChar(NULL, cur, &len);
3352 cur += len;
3353 }
3354
3355 if (val != 0) return(0);
3356
3357 return(1);
3358}
3359
3360/**
3361 * xmlValidateNameValue:

Callers 2

xmlValidateNameValueFunction · 0.85

Calls 3

xmlStringCurrentCharFunction · 0.85
xmlIsDocNameStartCharFunction · 0.85
xmlIsDocNameCharFunction · 0.85

Tested by

no test coverage detected