functx:replace-multi
Performs multiple replacements, using pairs of replace parameters
Description
The functx:replace-multi function performs multiple calls to the fn:replace function. It takes as arguments a sequence of strings or patterns to change from, and sequence of strings to change to. It iterates through the sequences, calling the built-in fn:replace function for each pair in order.
Parameters |
Description |
---|---|
arg:string() |
the string to manipulate |
changeFrom:string() |
the sequence of strings or patterns to change from |
changeTo:string() |
the sequence of strings to change to |
Examples
XPath |
Results |
---|---|
functx:replace-multi(‘abcdef123’,$fr,$to) |
xxxy0 |