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

Function xmlCtxtCheckName

ThirdParty/libxml2/vtklibxml2/debugXML.c:235–258  ·  view source on GitHub ↗

* xmlCtxtCheckName: * @ctxt: the debug context * @name: the name * * Do debugging on the name, for example the dictionary status and * conformance to the Name production. */

Source from the content-addressed store, hash-verified

233 * conformance to the Name production.
234 */
235static void
236xmlCtxtCheckName(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
260static void
261xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {

Callers 1

xmlCtxtGenericNodeCheckFunction · 0.85

Calls 3

xmlDebugErrFunction · 0.85
xmlValidateNameFunction · 0.85
xmlDictOwnsFunction · 0.85

Tested by

no test coverage detected