Subject: Re: [xsl] catching the last node still satisfying a condition From: Guillaume Rousse <rousse@xxxxxxxxxxxxxx> Date: Thu, 13 Sep 2001 14:47:38 +0200 |
Ainsi parlait Dimitar Peikov : > You can't without for-each cycle. because [] operands return 1 recordset > not an array. You must set exact match that is enshured that only one > element could contain this. A cycle for treating one only element ? And recordset are ordered: foo[3] returns the third foo child. > You possibly search for : > > foos/foo[position() = last()]/bar[position() < limit] IMHO, this will return all the <bar> child of the last <foo>, whose position regarding their <foo> parent is inferior or egal to limit Considering the following situation <foo> <foo id="foo1"> <bar/> </foo> <foo id="foo2"> <bar/> </foo> <foo id="foo3> </foo> </foo> i would like to catch foo2 with limit = 2 or 3, and foo1 with limit = 1 -- Guillaume Rousse <rousse@xxxxxxxxxxxxxx> GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] catching the last node st, Dimitar Peikov | Thread | Re: [xsl] catching the last node st, Dimitar Peikov |
Re: [xsl] catching the last node st, Dimitar Peikov | Date | [xsl] Re: XSL-List Digest V3 #1090, Gustaf Liljegren |
Month |