logo       

RE: Predicates are ignored in Xindice XPATH?: msg#00005

Subject: RE: Predicates are ignored in Xindice XPATH?
Good idea, this is one step closer to xquery.  I believe that the person
to implement this would be a good candidate for commit status, if they
were to be interested...

BTW- Has anyone from the xindice team ever contacted the saxon guys, to
check on how their xquery might be integrated?  I believe they may have
licensing conflicts, but maybe the saxon group would be interested in
adjusting the license for xindice use? (HINT: maybe this would solve the
whole issue)

-Kevin Ross

-----Original Message-----
From: Kurt Kavanaugh [mailto:kkavanaugh@xxxxxxxxxxxx] 
Sent: Wednesday, October 22, 2003 11:00 AM
To: xindice-users@xxxxxxxxxxxxxx
Subject: RE: Predicates are ignored in Xindice XPATH?


And therin lies the XPATH/collection ambiguity. It seems that there
needs to be a layer above to provide the abstraction for correct
aggregate functionality.


-----Original Message-----
From: Terry Rosenbaum [mailto:Terry@xxxxxxxxxx]
Sent: Wednesday, October 22, 2003 11:56 AM
To: xindice-users@xxxxxxxxxxxxxx
Subject: Re: Predicates are ignored in Xindice XPATH?


Hi WH,

Xindice does not implement aggregate
expressions across multiple Resources
contained in a Collection. The XPath expression
is evaluated against each Resource in the
Collection and all resulting Resources are returned.

You can perform certain aggregations
yourself in your application. For positional
aggregation such as suggested by (//data)[position()=last()],
be aware that the order of returned Resources
is arbitrary (not guaranteed by contract
as e.g. order of insertion AFAIK).

Thus, you would probably need to
perform a sort of some kind before choosing
the "last" for a meaningful result.

-Terry




webhiker@xxxxxxxxxx wrote:

> Hi Terry,
>
> No, even the testbed confirms my suspicions.
> The following expression on the testbed :
> (//data)[position()=last()]
>
> is what I want - only a single result. But running this through 
> Xindice it gives me a ResourceSet containing 3 resources.
>
> Seems the syntax is translated a bit ambiguously for some reason.
>
> I've not been able to solve the problem.
>
> WH
>
>
> Terry Rosenbaum wrote:
>
>> Hi WH,
>>
>> If, for example, you have 3 <Id> elements
>> in your collection, the correct result would
>> be 3 Resources each containing one of the 3 <Id>
>> elements.
>>
>> Your XPath syntax is not doing what you desire.
>>
>> Using an XPath testbed may help. One is available
>> on the web here: 
>> http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm
>>
>> -Terry
>>
>> webhiker@xxxxxxxxxx wrote:
>>
>>> Hi all,
>>>
>>> Given the XPath :
>>> (//Id)[last()]
>>>
>>> Xindice always seems to ignore the predicate portion, and it returns

>>> the results as if I had written :
>>> //Id
>>>
>>> Is this a problem with Xindice, XPath or my syntax? I'm trying to 
>>> return the last Id element in my database.
>>>
>>> I'd appreciate any help.
>>>
>>> Thanks
>>> WH
>>>
>>
>>
>
>




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe