Xquery / Xpath /* の意味は何ですか:
(: ここで $patterns は次のように<pattern match="something" replace="else" />
なります:)
declare function local:transform($text as text(), $patterns as element(pattern)*) {
if(not($patterns)) then
$text
else
let $patternsremaining := $patterns[position() > 1],
$modifiedtext := replace($text, $pattern/@match, $pattern/@replace)
return
if($local:language="French" and not($patterns[@match='le'])) then (
local:transform($modifiedtext, ($patternsremaining, <pattern match="Londres" replace="London" />))
)
else(
local:transform($modifiedtext, $patternsremaining)
)
};