Firstly, I'm new to XML and XSL/XSLT and this is my first project. I've got the grasp of how to do it all but I have come across a problem.
My homepage has a news section that has to display one article, being the latest. Another page however, needs to display all articles (including the latest) acting as a kind of history of articles.
My problem is this: the xml file that contains the information and has a link to a XSL file that contains a line of code (<xsl:for-each select="sitenews/item">) which makes each article shown. But I only want the latest article/item shown on my homepage whilst ALL other articles/items shown on the other page!!
What options do I have?
By the way, I am using a script to change my XML data to XHTML:
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
Your approach is limited to IE browser,instead use the XML file and import your xsl file in the xml file that will render in all major browsers
With that out of the way..it seems like the question of logic.
You have to find out a conditon that will determine that which report should be displayed..