* xmlCtxtNsCheckScope: * @ctxt: the debugging context * @node: the node * @ns: the namespace node * * Report if a given namespace is is not in scope. */
| 180 | * Report if a given namespace is is not in scope. |
| 181 | */ |
| 182 | static void |
| 183 | xmlCtxtNsCheckScope(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: |
no test coverage detected