Project

General

Profile

Actions

Bug #2052

closed

Metacat does not handle attribute XPATH queries correctly

Added by Chris Jones over 19 years ago. Updated over 19 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
metacat
Target version:
Start date:
03/23/2005
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2052

Description

When metacat is queried and one of the query parameters is a an XML attribute
expressed in XPATH, the resultant squery that is created doesn't create the
correct XPATH for the attribute. The final '/' before the attribute is
ommitted. This should be a simple fix in DBQuery.java.

Also, when only an attribute is used as a query parameter, an exception is
thrown in newPathExpressionWithOutAttribute in QuerySpecification.java.

An example:

http://metacat.nceas.ucsb.edu/knb/servlet/metacat?action=query&qformat=xml&/eml/@packageId=%25
(produces returned documents)

http://metacat.nceas.ucsb.edu/knb/servlet/metacat?action=query&qformat=xml&@packageId=%25
(produces the exception and no documents)

Actions

Also available in: Atom PDF