> From: Kimbro Staken [mailto:[EMAIL PROTECTED]]
> 
> On Friday, February 22, 2002, at 01:16 AM, Ugo Cei wrote:
> 
> > Stefano Mazzocchi wrote:
> >
> >> Anyway, can't we *directly* use RSS for blogs? is much more
semantic
> >> than OPML anyway.
> >
> > You asked for it, you got it. My "embryo-of-a-blog"
> > (http://violetta.cbim.it/cocoon/mount/beeb/) now uses RSS 1.0.
> >
> > You can also get the raw RSS feed by clicking on the little "XML"
button
> > in the bottom right.
> >
> > I have a problem now. I want to limit the entries displayed in the
> > homepage to the 20 most recent or so. I could do it in XSLT but it
would
> > be horrible performance-wise as the numner of entries grows. I
really
> > need to sort the entries in reverse date order and retrieve only the
> > first N items in the collection and do it in the XMLDB source. Ideas
> > anyone?
> >
> 
> We need a richer language then XPath to do that. It will come with
XQuery,
>   but it's a long way off. We'll need to figure something out in the
short
> term, but I'm not sure what. XSL-T is probably the best solution
today. To
> keep the size of the result set down you might need to limit the query
to
> just retrieving the last 7 days of posts or something along those
lines.
> Not ideal, I know.

Isn't Xindice collection already ordered by time document was inserted?

Than simple query like /db/blog/*[position() > last()-20] should work
then, or something like /db/blog/*[position() =
last()]/preceding::*[position() < 20] should even inverse the order...

Vadim


> >     Ugo
> >
> > P.S.: should we move this discussion to forrest-dev or maybe
cross-post?
> >
> >
> > -- Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
> > P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
> > Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
> >
> Kimbro Staken - http://www.kstaken.org - http://www.xmldatabases.org
> Apache Xindice native XML database http://xml.apache.org
> XML:DB Initiative http://www.xmldb.org
> Senior Technologist (Your company name here)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to