XSLT Question
-
I have a XML File of the format
India Player 1 India Player 2 India Player 3 India Player 4 India Player 5 India Player 6 India Player 7 India Player 8 India Player 9 India Player 10 Pakistan Player 1 Pakistan Player 2 Pakistan Player 3 Pakistan Player 4 Pakistan Player 5 Pakistan Player 6 Pakistan Player 7 Pakistan Player 8 Pakistan Player 9 Pakistan Player 10
I want to print this file in a tabular format with the name of the country in te header and the name of the players as rows. That is in a tabular format. Below the name of the country there should be the name of the players. Can anyone help me. -
I have a XML File of the format
India Player 1 India Player 2 India Player 3 India Player 4 India Player 5 India Player 6 India Player 7 India Player 8 India Player 9 India Player 10 Pakistan Player 1 Pakistan Player 2 Pakistan Player 3 Pakistan Player 4 Pakistan Player 5 Pakistan Player 6 Pakistan Player 7 Pakistan Player 8 Pakistan Player 9 Pakistan Player 10
I want to print this file in a tabular format with the name of the country in te header and the name of the players as rows. That is in a tabular format. Below the name of the country there should be the name of the players. Can anyone help me.Hi, This should get you started - it's not in a table, but you should get there from here
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <h1>Cricket</h1> <xsl:apply-templates select="CRICKET/TEAM"/> </body> </html> </xsl:template> <xsl:template match="TEAM"> <h2><xsl:value-of select="@Name" /></h2> <xsl:apply-templates select="PLAYER"/> </xsl:template> <xsl:template match="PLAYER"> <h3><xsl:value-of select="." /></h3> </xsl:template> </xsl:stylesheet>
Cheers Phil Hobgen barbari.co.uk Southampton, UK