* xmlCtxtCheckName: * @ctxt: the debug context * @name: the name * * Do debugging on the name, for example the dictionary status and * conformance to the Name production. */
| 233 | * conformance to the Name production. |
| 234 | */ |
| 235 | static void |
| 236 | xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name) |
| 237 | { |
| 238 | if (ctxt->check) { |
| 239 | if (name == NULL) { |
| 240 | xmlDebugErr(ctxt, XML_CHECK_NO_NAME, "Name is NULL"); |
| 241 | return; |
| 242 | } |
| 243 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
| 244 | if (xmlValidateName(name, 0)) { |
| 245 | xmlDebugErr3(ctxt, XML_CHECK_NOT_NCNAME, |
| 246 | "Name is not an NCName '%s'", (const char *) name); |
| 247 | } |
| 248 | #endif |
| 249 | if ((ctxt->dict != NULL) && |
| 250 | (!xmlDictOwns(ctxt->dict, name)) && |
| 251 | ((ctxt->doc == NULL) || |
| 252 | ((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) { |
| 253 | xmlDebugErr3(ctxt, XML_CHECK_OUTSIDE_DICT, |
| 254 | "Name is not from the document dictionary '%s'", |
| 255 | (const char *) name); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | static void |
| 261 | xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) { |
no test coverage detected