开发者

xsl:for each select command help

<xsl:for-each select="ComputerStoreProducts/List2/Pc">

for this code i need it to show the data for Pc,mouse,keyboard but it only shows Pc how can i make it do that as i have to write the code three times and the xsl:sort code doesnt work on all of the prices for each element as it only does Pc the mouse and then keyboard i want them together so开发者_JAVA百科 the show properly in accending format


Assuming that only Pc, Mouse and Keyboard are children of List2 (i.e. there are no other children), you could write:

 <xsl:for-each select="ComputerStoreProducts/List2/*">

If there are other children, and you only want those three:

 <xsl:for-each select="ComputerStoreProducts/List2/*[self::Pc | self::Mouse | self::Keyboard]">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜