[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL distinct group by date
Hi Everyone, I'm very new to XML/XSL, so I'm struggling with something that seems it should be fairly straightforward. With the following XML: <documents> <casestudies> <study id=""> <title /> <date /> <description><![CDATA[ ]]></description> <pdf /> <logo /> </study> </casestudies> <knowledgeadmin> <pressreleases> <pressrelease id=""> <title /> <date /> <description><![CDATA[ ]]></description> <pdf /> </pressrelease> </pressreleases> <whitepapers> <whitepaper id=""> <id /> <title /> <date /> <description><![CDATA[ ]]></description> <pdf /> </whitepaper> </whitepapers> </knowledgeadmin> <news> <newsitem id=""> <title /> <date /> <description><![CDATA[ ]]></description> <fulltext><![CDATA[ ]]></fulltext> </newsitem> </news> </documents> I want to be able to get the different groups (newsitem, whitepaper, pressrelease) each grouped by year. Using news as example, I want to generate a list of distinct years in news/newsitem/date and make that a URL that can be clicked to get the list of newsitems that were in that year. I'm open to suggestions on how the date should be formatted. I'm at a stage where I can restructure the XML as well, if that appears necessary. I'm on Win 2K3 Web Edition server using VBScript. Here is my transformation code, which should show the processors/versions used: <% ' load list of news dats from xml Dim oXSL Dim myTemplate Dim myProc Dim oXML set oXML = server.createobject("Microsoft.XMLDOM") oXML.async = false oXML.load( dbPath ) Set oXSL = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.4.0") oXSL.async = false oXSL.load Server.MapPath("xsl/date_list.xsl") ' compliled XSL template Set myTemplate = Server.CreateObject("Msxml2.XSLTemplate.4.0") myTemplate.stylesheet = oXSL Set myProc = myTemplate.createProcessor() myProc.input = oXML myProc.output = Response myProc.transform() %> I'm on a very tight deadline and having been trying/researching for several hours for a solution to this, so any help would be much appreciated. Thank you in advance! Mindy
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|