Given
How do I all but the last 4 characters of @baz? One of my attempts was:<
That's actually not so bad, but IIRC substring doesn't like negative indices. I tried
substring(/foo/bar/@baz, string-length(/foo/bar/@baz)-4)
Which gave me the expected result.