stephen1313 Posted November 6, 2010 Share Posted November 6, 2010 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. Link to comment Share on other sites More sharing options...
Martin Honnen Posted November 6, 2010 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"/> Link to comment Share on other sites More sharing options...
bitdowner Posted November 8, 2010 Share Posted November 8, 2010 Hello MartinYou can use RenderX XEP for generating HTML from XML+XSLRegards Link to comment Share on other sites More sharing options...
Martin Honnen Posted November 8, 2010 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. Link to comment Share on other sites More sharing options...
bitdowner Posted November 11, 2010 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.