projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i
[SXSI/xpathcomp.git]
/
src
/
nodeSet.ml
diff --git
a/src/nodeSet.ml
b/src/nodeSet.ml
index
944f85c
..
0828029
100644
(file)
--- 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 "<xml_result>\n" 0 13);
Unix.close
in
ignore (Unix.write fd "<xml_result>\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 "</xml_result>\n" 0 14);
finish fd
ignore (Unix.write fd "</xml_result>\n" 0 14);
finish fd