Bug #2650
openecogrid returnfields need to support more xpath
0%
Description
When you are dealing with documents that store a lot of information in xml attributes instead of CDATA nodes, it is imperative that xpath attribute queries work correctly. AFAICT, they don't work at all with the ecogrid returnfields. For instance, the element:
<property name="semanticType000" class="org.kepler.sms.SemanticType"
value="urn:lsid:localhost:onto:1:1#Variable">
</property>
The only meaniful way to get one of the attributes values based on another is via an attribute query like:
//property/[@name='semanticType000']/@value
which should return the value attribute of any property node with a name attribute equal to 'semanticType000'.
Related issues
Updated by Chad Berkley about 18 years ago
- Bug 2380 has been marked as a duplicate of this bug. ***
Updated by Chad Berkley about 18 years ago
this turns out to be a bigger issue than i thought. in face, i think it's a blocker for getting the remote actor search working in kepler. I had thought that, at least, the ecogrid would always return the returnfields in the same order which was allowing me to hack this by doing two returnfield queries then parsing the results (which were in effect name/value pairs). In fact, when i tried this on my laptop, the results were all hosed because the ecogrid returned the returnfields in totally different order than on my desktop. This has to be fixed soon.
Here's an example of the returnfields on my desktop with the query <returnfield>//property/@name</returnfield>
<returnfield>//property/@value</returnfield>
returnfield: f1:karId
returnfield: f0:urn:lsid:kepler-project.org:kar:3:1
returnfield: f1:semanticType111
returnfield: f0:urn:lsid:localhost:onto:1:1#TextualOutputActor
Note the values intuitively alternate. This makes sense to me. However, this is what I get when I do the same query on my laptop:
returnfield: f1:karId
returnfield: f1:semanticType111
returnfield: f0:urn:lsid:kepler-project.org:kar:3:1
returnfield: f0:urn:lsid:localhost:onto:1:1#TextualOutputActor
this is totally unparsable.