Bug #1
ItqlInterpreterBean.execute() generates wrong result doc if more than one command is given
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
fixed
Description
If more than command is supplied to [[ItqlInterpreterBean]].execute() then
<br/>
output produced looks like
<br/>
<br/>
<answer>
<br/>
<query>
<br/>
<variables>
<br/>
...
<br/>
</variables>
<br/>
<solution>
<br/>
...
<br/>
</solution>
<br/>
<solution>
<br/>
...
<br/>
</solution>
<br/>
<variables>
<br/>
...
<br/>
</variables>
<br/>
<solution>
<br/>
...
<br/>
</solution>
<br/>
<solution>
<br/>
...
<br/>
</solution>
<br/>
</query>
<br/>
</answer>
<br/>
<br/>
i.e. all answers appear in the same "query" element. I think the
<br/>
intention was that each command's output appear in a separate "query"
<br/>
element. This would make more sense and be easier to parse.
<br/>
Updated by ronald - over 17 years ago
According to the javadoc for node.appendChild(x):
<br/>
<br/>
If the newChild is already in the tree, it is first removed.
<br/>
<br/>
Since the same QUERY child is added each time, the result contains
<br/>
only a single "query" element. The patch fixes this to create a
<br/>
separate node for each query answer.
<br/>