问题
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(. > /Data/EI)][1]
To find the maximum value:
/Data/EI[not(. < /Data/EI)][1]
来源:https://stackoverflow.com/questions/18759984/find-max-value-of-a-node-using-xpath-in-xslt-version1-0