Project

General

Profile

Bug #1

ItqlInterpreterBean.execute() generates wrong result doc if more than one command is given

Added by ronald - over 16 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Mulgara
Target version:
-
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/>
&nbsp;&nbsp;&lt;answer&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;query&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;variables&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/variables&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;variables&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/variables&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/solution&gt;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/query&gt;
<br/>
&nbsp;&nbsp;&lt;/answer&gt;
<br/>

<br/>
i.e. all answers appear in the same &quot;query&quot; element. I think the
<br/>
intention was that each command's output appear in a separate &quot;query&quot;
<br/>
element. This would make more sense and be easier to parse.
<br/>

#1

Updated by ronald - over 16 years ago

According to the javadoc for node.appendChild(x):
<br/>

<br/>
&nbsp;&nbsp;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 &quot;query&quot; element. The patch fixes this to create a
<br/>
separate node for each query answer.
<br/>

#2

Updated by Paula Gearon almost 16 years ago

Applied and checked in

Also available in: Atom PDF