Re: [xsl] XPath expression which converts the output of path() into an abbreviated path?

Subject: Re: [xsl] XPath expression which converts the output of path() into an abbreviated path?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Aug 2022 12:45:26 -0000
Am 17.08.2022 um 14:38 schrieb Alan Painter alan.painter@xxxxxxxxx:
Suggesting similar:

For variable $s with string text ...

tokenize($s, '/')[position() = (last()-2 to last())]!replace(.,
'.*\}(.*)\[.*', '$1')=>string-join('/')


Looks way better, I always feel I shoot myself into the foot if I need
to mix ! and => and need a lot of parenthesis but your attempt seemed to
elegantly avoid that problem.

Current Thread