Debian Codegraph @

examples/ed-expr

raw
1 #!/bin/sh
2 ./xmlstarlet ed \
3 -u /xml/table/rec/@id -x .+1 \
4 -a /xml/table -t elem -n highest-record -v '' \
5 -u '$xstar:prev' -x '/xml/table/rec[numField=math:max(../rec/numField)]' \
6 xml/table.xml