Subject:Display top n items from categories in certain sequence Author:Xin He Date:04 Oct 2007 08:46 AM
Hello all,
I have an xml file which is a list of articles. I need to display the 2 most recent ones, in which one should be from the category of "News" and the other one from any other categories. And they need to be sorted by the publish date. I can display the two items by using
Subject:Display top n items from categories in certain sequence Author:Xin He Date:04 Oct 2007 02:50 PM
Thanks for the idea James.
I tried the template approach but the position() is not working. I need, for example, if the most recent News is in the forth position of the whole list, I still need it to be display since it is the top 1 News.
With the for-each approach, the position() < 2 works because it is relative to the context nodeset.
or am I just not placing it in the right place... please see the xsl and let me know what you think. Thanks a lot !!