Working with XML & XSL
- by gsvirdi
I'm planning to create a news item which uses xml as it's backend and the Display should be like:
Date: 08/Mar/2010
------------------------------
Title | News
------------------------------
News 4 | Some news
News 3 | Some news
News 2 | Some news
News 1 | Some news
------------------------------
Date: 07/Mar/2010
------------------------------
Title | News
------------------------------
News 5 | Some news
News 4 | Some news
News 3 | Some news
News 2 | Some news
News 1 | Some news
Display should be sorted on Date (descending)
Then news items should be sorted on time (descending)
Today's news item should be on top, then titles should be sorted-decending (timewise), later will come previous day's news items.
I'm not able to come up with the logic of xml which should be used in this case. moreover I'm not able to figure out how should I check "Today's date" in xml's "if" statement. Can I please get some code sample to understand this kinda logic???