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

Function xmlCtxtDumpNamespace

ThirdParty/libxml2/vtklibxml2/debugXML.c:699–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

697}
698
699static void
700xmlCtxtDumpNamespace(xmlDebugCtxtPtr ctxt, xmlNsPtr ns)
701{
702 xmlCtxtDumpSpaces(ctxt);
703
704 if (ns == NULL) {
705 if (!ctxt->check)
706 fprintf(ctxt->output, "namespace node is NULL\n");
707 return;
708 }
709 if (ns->type != XML_NAMESPACE_DECL) {
710 xmlDebugErr(ctxt, XML_CHECK_NOT_NS_DECL,
711 "Node is not a namespace declaration");
712 return;
713 }
714 if (ns->href == NULL) {
715 if (ns->prefix != NULL)
716 xmlDebugErr3(ctxt, XML_CHECK_NO_HREF,
717 "Incomplete namespace %s href=NULL\n",
718 (char *) ns->prefix);
719 else
720 xmlDebugErr(ctxt, XML_CHECK_NO_HREF,
721 "Incomplete default namespace href=NULL\n");
722 } else {
723 if (!ctxt->check) {
724 if (ns->prefix != NULL)
725 fprintf(ctxt->output, "namespace %s href=",
726 (char *) ns->prefix);
727 else
728 fprintf(ctxt->output, "default namespace href=");
729
730 xmlCtxtDumpString(ctxt, ns->href);
731 fprintf(ctxt->output, "\n");
732 }
733 }
734}
735
736static void
737xmlCtxtDumpNamespaceList(xmlDebugCtxtPtr ctxt, xmlNsPtr ns)

Callers 2

xmlCtxtDumpNamespaceListFunction · 0.85
xmlCtxtDumpOneNodeFunction · 0.85

Calls 4

xmlCtxtDumpSpacesFunction · 0.85
fprintfFunction · 0.85
xmlDebugErrFunction · 0.85
xmlCtxtDumpStringFunction · 0.85

Tested by

no test coverage detected