X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_write.c;h=cba4ae9cbece263b36710f0522b42dc7202e0210;hb=32ff7687bdfe5b972d54b1ba4f3078cee011fadf;hp=69d8db6a6726866a8012ab62d5fc5fbe09206691;hpb=3dcdf20f2ccc20554dc247f60281eb06111f0bf6;p=yaz-moved-to-github.git diff --git a/retrieval/d1_write.c b/retrieval/d1_write.c index 69d8db6..cba4ae9 100644 --- a/retrieval/d1_write.c +++ b/retrieval/d1_write.c @@ -3,7 +3,7 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Id: d1_write.c,v 1.15 2002-07-25 12:52:53 adam Exp $ + * $Id: d1_write.c,v 1.16 2002-07-29 20:04:08 adam Exp $ */ #include @@ -220,8 +220,20 @@ char *data1_nodetoidsgml (data1_handle dh, data1_node *n, int select, int *len) wrbuf_rewind(b); + if (!data1_is_xmlmode (dh)) + { + wrbuf_puts (b, "<"); + wrbuf_puts (b, n->u.root.type); + wrbuf_puts (b, ">\n"); + } if (nodetoidsgml(n, select, b, 0, 0 /* no pretty format */)) return 0; + if (!data1_is_xmlmode (dh)) + { + wrbuf_puts (b, "u.root.type); + wrbuf_puts (b, ">\n"); + } *len = wrbuf_len(b); return wrbuf_buf(b); }