As we said in the other thread we're not sure about the impact of `p:viewport`, but OK let's use XSLT.
In any case, I'm not sure about the actual implementation. IIUC previously you had 1 call to `replace` and now you have 1 call of `replace`, `contains`, `substring-before`, `string-join`, and possibly one call of `substring-after`. I'm not sure that's an improvement :)