开发者

XSLT dividing a list of nodes in thirds

开发者 https://www.devze.com 2023-02-13 17:44 出处:网络
How can I divide a list of nodes into thirds an开发者_JAVA技巧d put them into 3 columnsyou need smt like this:

How can I divide a list of nodes into thirds an开发者_JAVA技巧d put them into 3 columns


you need smt like this:

<table><tr>
<xsl:for-each select="nodesPath">
   <xsl:if test='((position()-1) mod 3)=0'>
       <xsl:text disable-output-escaping="yes"><![CDATA[</tr><tr>]]></xsl:text>
   </xsl:if>
   <td>content</td>
</xsl:for-each>
</tr></table>
0

精彩评论

暂无评论...
验证码 换一张
取 消