* For XML, the first character of a tag cannot be numeric, but people * will likely not notice. So we people-proof them by forcing a leading * underscore if they use invalid tags. Note that this doesn't cover * all broken tags, just this fairly specific case. */
| 562 | * all broken tags, just this fairly specific case. |
| 563 | */ |
| 564 | static const char * |
| 565 | xo_xml_leader_len (xo_handle_t *xop, const char *name, xo_ssize_t nlen) |
| 566 | { |
| 567 | if (name == NULL || isalpha(name[0]) || name[0] == '_') |
| 568 | return ""; |
| 569 | |
| 570 | xo_failure(xop, "invalid XML tag name: '%.*s'", nlen, name); |
| 571 | return "_"; |
| 572 | } |
| 573 | |
| 574 | static const char * |
| 575 | xo_xml_leader (xo_handle_t *xop, const char *name) |
no test coverage detected