X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FnodeSet.ml;h=082802930f44432e6421a75b5bd229027a0c42c8;hb=eb9a6467cb0860abf57f773a82da526aedc9802a;hp=944f85c0dfae609a31072e1a6d47f7691abbd204;hpb=35b9abd60699383b0cebf25e905049d3d7027271;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