Yes, I mean the XML file. I using a query like the following. There are nodes for which the replace updating expression does not work, and I do not know how to identify the file(s) where the problem is. I could simply try to exclude files from the collection until the query works, but I was wondering whether there is a more intelligent way to do that. Thanks!
try {
for $f in collection("/mycollection/")
return
copy $e := $f
modify
(
for $x in $e//C[text()="*"][./following-sibling::C[matches(., "\p{L}")]]
let $y := $x/(following-sibling::C[matches(., "\p{L}")])[1]
return
replace value of node $y with upper-case($y)
)
return $e
}
catch * {
'Error [' || $err:code || ']: ' || $err:description || ',' || $err:module ||',' ||$err:line-number || ','|| $err:column-number
|| ','|| $err:value || ','|| $err:additional
}