On Friday, February 22, 2002, at 10:03 AM, Ugo Cei wrote:
> Vadim Gritsenko wrote: > >> Isn't Xindice collection already ordered by time document was inserted? > > It looks like it is, but I don't know if this is guaranteed. > It's not, indexing in particular could alter the order. >> 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... > > It doesn't work. position() is 1 for all the nodes returned. This sitemap > entry retrieves all the items in the collection: > That's right, position will only apply within a single document, not across documents in a collection. > <map:match pattern=""> > <map:generate > src="xmldb:xindice://dbsun.cbim.it:4080/db/rssblog/#/rss:item[position()=1] > "/> > <map:transform src="stylesheets/xmldb2rss.xsl" label="rss"/> > <map:transform src="stylesheets/blog.xsl"/> > <map:serialize/> > </map:match> > > If I change "position()=1" to "position()=2", then no item is found. > > Ugo > > > -- 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]