i assumed to get the max.systemId of total systems. So i sort the systemId descending and the first one has the max. systemId. Who has a better idea to get the max. value with xquery?
Furthermore, i’v got an error message with sorting like this:
variable undefined; varable q
-----here is my xquery
for $q in input()/system sort by($q/key/systemId descending) return $q/key/systemId
any suggestion is welcome,