On 07/29/10 07:17 PM, Keith Mitchell wrote:
> On 07/29/10 08:30 AM, Jack Schwartz wrote:
>> Hi Darren.
>>
>> I agree that it is very useful to take a path.  The proposal you laid 
>> out looks good.  I suggest an addition, based on a useful feature of 
>> ManifestServ:  the ability to add values to the search, to narrow it 
>> down.
>>
>> Suppose you have two elements of type X, one with value 1 and one with 
>> value 2, and you want to retrieve the value of //X/Y but only for the 
>> second X element.  Something like //X=1/Y could specify this.  (Pretty 
>> sure that Xpath has a way to specify this kind of thing, though I 
>> don't know it off hand.)
>>
> 
> I believe the xpath syntax equivalent is:
> /element[index]
> e.g.,
> /X[1]/Y[0]
> 
> Darren:
> I think the proposal is good - it's close enough to xpath to be 
> familiar, but different enough to be distinct. I do suggest putting the 
> "#num" and "?num" qualifiers in brackets, e.g.:
> 
> //obj[?3]/child[#3]/@someclass[0]/myobj.variable
> 
> - Keith

I may be mistaken, but I feel that what Jack is referring to when he says "X=1"
is that it's the object which has the value X=1, as opposed to what you are
referring to which is X[1] which is the 2nd element (index == 1).

Is that right, or am I mis-interpreting what you and Jack are suggesting?

Thanks,

darren.


_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to