replaced simple string-joins with core:join-path-elements()