在 xslt version1.0 中使用 xpath 查找节点的最大值 [英] Find max value of a node using xpath in xslt version1.0
本文介绍了在 xslt version1.0 中使用 xpath 查找节点的最大值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 xslt 的新蜜蜂.有人可以就以下问题提供一些指导吗我需要编写一个模板,从下面的输入返回最大值和最小值节点 EI
I am a new bee to xslt . can someone provide some guidance regarding the below issue I need to write a template which returns max and min value node EI from the below input
<Data>
<EI>110</EI>
<EI>111</EI>
<EI>112</EI>
<EI>113</EI>
<EI>114</EI>
<EI>115</EI>
</Data>
推荐答案
求最小值:
/Data/EI[not(. > /Data/EI)][1]
求最大值:
/Data/EI[not(. < /Data/EI)][1]
这篇关于在 xslt version1.0 中使用 xpath 查找节点的最大值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文