使用xslt重新排列项目 [英] To Rearrange the items using xslt

查看:95
本文介绍了使用xslt重新排列项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


I want to display the items in an order such that the div which contains the maximum items should be displayed first and div which is empty should be placed in the end how to do it

推荐答案

应该很容易实现:使用^ ]!

That should be quite easy to achieve: Use the Xsl Sort Tag[^]!

<xsl:sort select="expression"

          lang="language-code"

          data-type="text|number|qname"

          order="ascending|descending"

          case-order="upper-first|lower-first"

/> 



然后让select变成这样:



and let the select be something like this:

select = "count(node-expression-that selects-a-bunch-of-nodes)"



问候,

曼弗雷德(Manfred)



Regards,

Manfred


这篇关于使用xslt重新排列项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆