Find max value of a node using xpath in xslt version1.0

╄→гoц情女王★ 提交于 2019-12-11 11:24:16

问题


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>

回答1:


To find the minimum value:

/Data/EI[not(. &gt; /Data/EI)][1]

To find the maximum value:

/Data/EI[not(. &lt; /Data/EI)][1]


来源:https://stackoverflow.com/questions/18759984/find-max-value-of-a-node-using-xpath-in-xslt-version1-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!