stephen1313 0 Posted November 6, 2010 Report Share Posted November 6, 2010 (edited) I would like to create an xsl file that takes XML info and displays it in HTML.XML format is:<Entry> <Author> <FirstName>joe</FirstName> <LastName>smith</LastName> </Author> <Author> <FirstName>bill</FirstName> <LastName>smith</LastName> </Author> <Author> <FirstName>dave</FirstName> <LastName>smith</LastName> </Author> <Author> <FirstName>mary</FirstName> <LastName>smith</LastName> </Author> <Title>cool writings</Title> <Booktitle>XML guideline</Booktitle> <Year>3000</Year> <Type>Journal</Type> <Topic>SEC</Topic> <Download>book1.doc</Download> </Entry>I want the output to be sorted by year (in an ordered table (decending by year and month).I would also like to have a select statement that works off of the year so I can group by year (I.E. 2010, 2009, 2008 etc.)Any help is appreciated. Edited November 6, 2010 by stephen1313 Quote Link to post Share on other sites
Martin Honnen 16 Posted November 6, 2010 Report Share Posted November 6, 2010 Grouping can be done in XSLT 2.0 with for-each-group e.g. <xsl:for-each-group select="//Entry" group-by="Year"> To sort do <xsl:for-each-group select="//Entry" group-by="Year"> <xsl:sort select="Year" data-type="number" order="descending"/> Quote Link to post Share on other sites
bitdowner 0 Posted November 8, 2010 Report Share Posted November 8, 2010 (edited) Hello MartinYou can use RenderX XEP for generating HTML from XML+XSLRegards Edited November 8, 2010 by Gregory House Quote Link to post Share on other sites
Martin Honnen 16 Posted November 8, 2010 Report Share Posted November 8, 2010 The documentation of RenderX XEP says it is an XSL-FO processor implemented in Java so you might be using some additional XSLT processor implemented in Java. That way you could switch the XSLT processor to Saxon 9 and use XSLT 2.0 code I posted earlier. I don't know how to use Saxon with XEP, maybe they have a forum where you can ask whether/how that is possible. Quote Link to post Share on other sites
bitdowner 0 Posted November 11, 2010 Report Share Posted November 11, 2010 The documentation of RenderX XEP says it is an XSL-FO processor implemented in Java so you might be using some additional XSLT processor implemented in Java. That way you could switch the XSLT processor to Saxon 9 and use XSLT 2.0 code I posted earlier. I don't know how to use Saxon with XEP, maybe they have a forum where you can ask whether/how that is possible.Hello, It is RenderX forum ... try it forum Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.