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

Function xmlC14NPrintNamespaces

ThirdParty/libxml2/vtklibxml2/c14n.c:523–545  ·  view source on GitHub ↗

* xmlC14NPrintNamespaces: * @ns: the pointer to namespace * @ctx: the C14N context * * Prints the given namespace to the output buffer from C14N context. * * Returns 1 on success or 0 on fail. */

Source from the content-addressed store, hash-verified

521 * Returns 1 on success or 0 on fail.
522 */
523static int
524xmlC14NPrintNamespaces(const xmlNs *ns, xmlC14NCtxPtr ctx)
525{
526
527 if ((ns == NULL) || (ctx == NULL)) {
528 xmlC14NErrParam(ctx);
529 return 0;
530 }
531
532 if (ns->prefix != NULL) {
533 xmlOutputBufferWriteString(ctx->buf, " xmlns:");
534 xmlOutputBufferWriteString(ctx->buf, (const char *) ns->prefix);
535 xmlOutputBufferWriteString(ctx->buf, "=");
536 } else {
537 xmlOutputBufferWriteString(ctx->buf, " xmlns=");
538 }
539 if(ns->href != NULL) {
540 xmlOutputBufferWriteQuotedString(ctx->buf, ns->href);
541 } else {
542 xmlOutputBufferWriteString(ctx->buf, "\"\"");
543 }
544 return (1);
545}
546
547static int
548xmlC14NPrintNamespacesWalker(const void *ns, void *ctx) {

Calls 3

xmlC14NErrParamFunction · 0.85

Tested by

no test coverage detected