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

Function xmlCtxtNsCheckScope

ThirdParty/libxml2/vtklibxml2/debugXML.c:182–206  ·  view source on GitHub ↗

* xmlCtxtNsCheckScope: * @ctxt: the debugging context * @node: the node * @ns: the namespace node * * Report if a given namespace is is not in scope. */

Source from the content-addressed store, hash-verified

180 * Report if a given namespace is is not in scope.
181 */
182static void
183xmlCtxtNsCheckScope(xmlDebugCtxtPtr ctxt, xmlNodePtr node, xmlNsPtr ns)
184{
185 int ret;
186
187 ret = xmlNsCheckScope(node, ns);
188 if (ret == -2) {
189 if (ns->prefix == NULL)
190 xmlDebugErr(ctxt, XML_CHECK_NS_SCOPE,
191 "Reference to default namespace not in scope\n");
192 else
193 xmlDebugErr3(ctxt, XML_CHECK_NS_SCOPE,
194 "Reference to namespace '%s' not in scope\n",
195 (char *) ns->prefix);
196 }
197 if (ret == -3) {
198 if (ns->prefix == NULL)
199 xmlDebugErr(ctxt, XML_CHECK_NS_ANCESTOR,
200 "Reference to default namespace not on ancestor\n");
201 else
202 xmlDebugErr3(ctxt, XML_CHECK_NS_ANCESTOR,
203 "Reference to namespace '%s' not on ancestor\n",
204 (char *) ns->prefix);
205 }
206}
207
208/**
209 * xmlCtxtCheckString:

Callers 1

xmlCtxtGenericNodeCheckFunction · 0.85

Calls 2

xmlNsCheckScopeFunction · 0.85
xmlDebugErrFunction · 0.85

Tested by

no test coverage detected