I have xml file like:
<lines> <line> <id>1</id> <value>1</value> </line> <line> <id>2</id> <value>2</value> </line> <line> <id>3</id> <value>3</value> </line> <line> <id>4</id> <value>4</value> </line> <line> <id>5</id> <value>5</value> </line> <line> <id>6</id> <value>6</value> </line> <line> <id>7</id> <value>7</value> </line> <line> <id>8</id> <value>8</value> </line> <lines>
and my xslt file:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <table border="1"> <xsl:for-each select="lines/line"> <tr> <td><xsl:value-of select="id"/></td> <td><xsl:value-of select="value"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template>
My question is, how can I divide this xml nodes due to a table height? For example, after table reaches 100px, then close table tag and create new table and add tr tag to this new table?
How can I succeed this? I tried for row count but sometimes text in xml can be very large. So, I want to descrease row number of table.
Any help?
No comments:
Post a Comment