Project

General

Profile

Bug #2380

returnfield system needs to implement more xpath

Added by Chad Berkley almost 14 years ago. Updated about 13 years ago.

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

0%

Estimated time:
Bugzilla-Id:
2380

Description

The XPath system used when processing the returnfield params is inadequate when
you want to proceess data out of a document that contains a lot of xml
attributes. For instance, if you have an entity like this:

<sometag name="x" value="y"/>

It is impossible to pull the 'value' attribute from the xml based on the 'name'
attribute. The correct xpath query for pulling the value 'y' from this is
/sometag[@name=x]/@value. This syntax is not supported by the returnfield
processor, but it should be.


Related issues

Has duplicate SEEK - Bug #2650: ecogrid returnfields need to support more xpathNew11/08/2006

History

#1 Updated by Saurabh Garg about 13 years ago

If I understand the bug correctly, then this functionality is already present in
src/edu/ucsb/nceas/metacat/QuerySpecification.java. So what needs to be investigated first is that if the functionality is not working. Here is a test query which worked fine for me

&lt;pathquery version="1.0"&gt;
&lt;querytitle&gt;unspecified&lt;/querytitle&gt;
&lt;returnfield&gt;@docid&lt;/returnfield&gt;
&lt;returndoctype&gt;eml://ecoinformatics.org/eml-2.0.1&lt;/returndoctype&gt;
&lt;returndoctype&gt;eml://ecoinformatics.org/eml-2.0.0&lt;/returndoctype&gt;
&lt;querygroup operator="UNION"&gt;
&lt;queryterm casesensitive="false" searchmode="contains"&gt;
&lt;value&gt;gce&lt;/value&gt;
&lt;/queryterm&gt;
&lt;/querygroup&gt;
&lt;/pathquery&gt;

#2 Updated by Chad Berkley about 13 years ago

this is a duplicate of another ecogrid bug. the query statement in sid's comment does not do what the query statement in my original posting does. i.e. @docid is not the same as /x[@docid='x']/@value. I need to be able to be able to pull one attribute based on the value of another in the same element.

  • This bug has been marked as a duplicate of 2650 ***

#3 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 2380

Also available in: Atom PDF