Project

General

Profile

Actions

Bug #1139

closed

squery produces output that is not well-formed

Added by Matt Jones about 21 years ago. Updated about 21 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
metacat
Target version:
Start date:
09/03/2003
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1139

Description

When a metacat query is submitted using the "squery" approach and the query
document is missing the xml declaration (i.e., ""), then
the output that is returned is not well-formed. In particular, the leading
"pathquery" element is missing its "<" opening tag delimiter. Metacat should
accept documents without the xml declaration, and should never produce
non-well-formed output (its clear that the query is running successfully, but
the output formatting is getting messed up).

Here's an example return from metacat:


<resultset>
<query>pathquery version="1.0">
<returndoctype>meeting</returndoctype>
<returnfield>/meeting/title</returnfield>
<returnfield>/meeting/start</returnfield>
<returnfield>/meeting/end</returnfield>
<querygroup operator="INTERSECT">

&lt;queryterm casesensitive="false" searchmode="contains"&gt;
&lt;value&gt;%&lt;/value&gt;
&lt;/queryterm&gt;
&lt;/querygroup&gt;
&lt;/pathquery&gt;&lt;/query&gt;
&lt;document&gt;&lt;docid&gt;mtg-test.1.2&lt;/docid&gt;&lt;docname&gt;meeting&lt;/docname&gt;&lt;doctype&gt;meeting&lt;/doctype&gt;&lt;createdate&gt;2003-08-14
21:37:36.0&lt;/createdate&gt;&lt;updatedate&gt;2003-08-15 15:09:41.0&lt;/updatedate&gt;&lt;param
name="/meeting/title">SEEK All-Hands Meeting 2003&lt;/param&gt;&lt;param
name="/meeting/end">14 Oct 2003&lt;/param&gt;&lt;param name="/meeting/start"&gt;10 Oct
2003&lt;/param&gt;&lt;/document&gt;&lt;/resultset&gt;

That document was produced from the following query:

<pathquery version="1.0">
<returndoctype>meeting</returndoctype>
<returnfield>/meeting/title</returnfield>
<returnfield>/meeting/start</returnfield>
<returnfield>/meeting/end</returnfield>
<querygroup operator="INTERSECT">
<queryterm casesensitive="false" searchmode="contains">
<value>%</value>
</queryterm>
</querygroup>
</pathquery>

If instead on changes the query to this:


<pathquery version="1.0">
<returndoctype>meeting</returndoctype>
<returnfield>/meeting/title</returnfield>
<returnfield>/meeting/start</returnfield>
<returnfield>/meeting/end</returnfield>
<querygroup operator="INTERSECT">
<queryterm casesensitive="false" searchmode="contains">
<value>%</value>
</queryterm>
</querygroup>
</pathquery>

then the metacat response is a well-formed result, like this:


<resultset>
<query>
<pathquery version="1.0">
<returndoctype>meeting</returndoctype>
<returnfield>/meeting/title</returnfield>
<returnfield>/meeting/start</returnfield>
<returnfield>/meeting/end</returnfield>

&lt;querygroup operator="INTERSECT"&gt;
&lt;queryterm casesensitive="false" searchmode="contains"&gt;
&lt;value&gt;%&lt;/value&gt;
&lt;/queryterm&gt;
&lt;/querygroup&gt;
&lt;/pathquery&gt;&lt;/query&gt;
&lt;document&gt;&lt;docid&gt;mtg-test.1.2&lt;/docid&gt;&lt;docname&gt;meeting&lt;/docname&gt;&lt;doctype&gt;meeting&lt;/doctype&gt;&lt;createdate&gt;2003-08-14
21:37:36.0&lt;/createdate&gt;&lt;updatedate&gt;2003-08-15 15:09:41.0&lt;/updatedate&gt;&lt;param
name="/meeting/title">SEEK All-Hands Meeting 2003&lt;/param&gt;&lt;param
name="/meeting/end">14 Oct 2003&lt;/param&gt;&lt;param name="/meeting/start"&gt;10 Oct
2003&lt;/param&gt;&lt;/document&gt;&lt;/resultset&gt;
Actions #1

Updated by Jing Tao about 21 years ago

In MetaCatServlet class, the code for handle the pathquery without xml declaration.
The bug was fixed.

Actions #2

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 1139

Actions

Also available in: Atom PDF