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

Function xmlIsNameChar

ThirdParty/libxml2/vtklibxml2/parser.c:3204–3241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3202}
3203
3204static int
3205xmlIsNameChar(xmlParserCtxtPtr ctxt, int c) {
3206 if ((ctxt->options & XML_PARSE_OLD10) == 0) {
3207 /*
3208 * Use the new checks of production [4] [4a] amd [5] of the
3209 * Update 5 of XML-1.0
3210 */
3211 if ((c != ' ') && (c != '>') && (c != '/') && /* accelerators */
3212 (((c >= 'a') && (c <= 'z')) ||
3213 ((c >= 'A') && (c <= 'Z')) ||
3214 ((c >= '0') && (c <= '9')) || /* !start */
3215 (c == '_') || (c == ':') ||
3216 (c == '-') || (c == '.') || (c == 0xB7) || /* !start */
3217 ((c >= 0xC0) && (c <= 0xD6)) ||
3218 ((c >= 0xD8) && (c <= 0xF6)) ||
3219 ((c >= 0xF8) && (c <= 0x2FF)) ||
3220 ((c >= 0x300) && (c <= 0x36F)) || /* !start */
3221 ((c >= 0x370) && (c <= 0x37D)) ||
3222 ((c >= 0x37F) && (c <= 0x1FFF)) ||
3223 ((c >= 0x200C) && (c <= 0x200D)) ||
3224 ((c >= 0x203F) && (c <= 0x2040)) || /* !start */
3225 ((c >= 0x2070) && (c <= 0x218F)) ||
3226 ((c >= 0x2C00) && (c <= 0x2FEF)) ||
3227 ((c >= 0x3001) && (c <= 0xD7FF)) ||
3228 ((c >= 0xF900) && (c <= 0xFDCF)) ||
3229 ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
3230 ((c >= 0x10000) && (c <= 0xEFFFF))))
3231 return(1);
3232 } else {
3233 if ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
3234 (c == '.') || (c == '-') ||
3235 (c == '_') || (c == ':') ||
3236 (IS_COMBINING(c)) ||
3237 (IS_EXTENDER(c)))
3238 return(1);
3239 }
3240 return(0);
3241}
3242
3243static const xmlChar *
3244xmlParseNameComplex(xmlParserCtxtPtr ctxt) {

Callers 3

xmlParseNCNameComplexFunction · 0.85
xmlParseStringNameFunction · 0.85
xmlParseNmtokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected