On 10/09/2012 09:34, Santhosh R Bhat wrote:

Two points:

(a) This list is for questions about Saxon, not general XSLT questions. Those are best raised on StackOverflow or on the xsl-list at mulberrytech.com.

(b) Sending your code as an image means (i) that the message has to be moderated, and (ii) that I can't copy/paste the code.

(c) It's always a good idea to show your best efforts at solving the problem. That tells us something about how much you know and how much you need to learn.

Try

count(preceding::quality[@rate='good'])

and

count(following::quality[@rate='good'])

If all the elements you are looking for are always "first cousins" (share the same grandparent) then you could instead do

count(../preceding-sibling::*/*/quality[@rate='good'])

and

count(../preceding-sibling::*/*/quality[@rate='good'])

which might be more efficient.

Michael Kay
Saxonica

Hi,

I have query regarding XSLT 2.0. Please refer the attachment for the
description of the query. Could you please help to solve the problem.

Thanks
Santhosh


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help