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

Function xmlIsDocNameStartChar

ThirdParty/libxml2/vtklibxml2/valid.c:3258–3286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3256}
3257
3258static int
3259xmlIsDocNameStartChar(xmlDocPtr doc, int c) {
3260 if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) {
3261 /*
3262 * Use the new checks of production [4] [4a] amd [5] of the
3263 * Update 5 of XML-1.0
3264 */
3265 if (((c >= 'a') && (c <= 'z')) ||
3266 ((c >= 'A') && (c <= 'Z')) ||
3267 (c == '_') || (c == ':') ||
3268 ((c >= 0xC0) && (c <= 0xD6)) ||
3269 ((c >= 0xD8) && (c <= 0xF6)) ||
3270 ((c >= 0xF8) && (c <= 0x2FF)) ||
3271 ((c >= 0x370) && (c <= 0x37D)) ||
3272 ((c >= 0x37F) && (c <= 0x1FFF)) ||
3273 ((c >= 0x200C) && (c <= 0x200D)) ||
3274 ((c >= 0x2070) && (c <= 0x218F)) ||
3275 ((c >= 0x2C00) && (c <= 0x2FEF)) ||
3276 ((c >= 0x3001) && (c <= 0xD7FF)) ||
3277 ((c >= 0xF900) && (c <= 0xFDCF)) ||
3278 ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
3279 ((c >= 0x10000) && (c <= 0xEFFFF)))
3280 return(1);
3281 } else {
3282 if (IS_LETTER(c) || (c == '_') || (c == ':'))
3283 return(1);
3284 }
3285 return(0);
3286}
3287
3288static int
3289xmlIsDocNameChar(xmlDocPtr doc, int c) {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected