X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FnodeSet.ml;h=082802930f44432e6421a75b5bd229027a0c42c8;hb=4814ef8392dd9197a6bef7d7bc82be4c2b8e7f5d;hp=944f85c0dfae609a31072e1a6d47f7691abbd204;hpb=32a3f16135e1a8f78d7fd7629dc1237e9de686b2;p=SXSI%2Fxpathcomp.git diff --git a/src/nodeSet.ml b/src/nodeSet.ml index 944f85c..0828029 100644 --- a/src/nodeSet.ml +++ b/src/nodeSet.ml @@ -200,8 +200,10 @@ module Mat : S with type t = Tree.node mat = Unix.close in ignore (Unix.write fd "\n" 0 13); - iter (fun node -> Tree.print_xml v node fd) l; - Tree.flush v fd; + if l.length > 0 then begin + iter (fun node -> Tree.print_xml v node fd) l; + Tree.flush v fd; + end; ignore (Unix.write fd "\n" 0 14); finish fd