[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] XSL distinct group by date
Subject: [xsl] XSL distinct group by date From: "Mindy McCutchan" <karma@xxxxxxxxxxxxxx> Date: Sat, 23 Apr 2005 21:49:25 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] CLARIFICATION ON MY XSLT, Mukul Gandhi | Thread | RE: [xsl] XSL distinct group by dat, Michael Kay |
Re: [xsl] grouping/position problem, Bruce D'Arcus | Date | RE: [xsl] XSL distinct group by dat, Michael Kay |
Month |