开发者

XSL sort functionality

<xsl:apply-templates 
  select="$tempPosterItemNodeSet/开发者_JAVA百科CurrentPosterItemCollection/PosterItem" 
  mode="PosterItem">

    <xsl:sort 
      select="$tempPosterItemNodeSet/CurrentPosterItemCollection/PosterItem/Property[@name='WidgetID']" 
      data-type="number"/>

</xsl:apply-templates>

I need to xslt sort a nodeset that I am passing to a template in the sample I have put above.

Can anybody let me know How I can sort the above xsl logic ??


I think this could work:

<xsl:apply-templates  
  select="$tempPosterItemNodeSet/CurrentPosterItemCollection/PosterItem"  
  mode="PosterItem"> 

    <xsl:sort  
      select="Property[@name='WidgetID']"  
      data-type="number"/> 

</xsl:apply-templates> 

From http://www.w3.org/TR/xslt#sorting

For each node to be processed, the expression is evaluated with that node as the current node and with the complete list of nodes being processed in unsorted order as the current node list.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜