fragmentToString

Returns fragment in string notation (e.g. to be used in the string representation of a path). Id fragments may end up escaped when they would otherwise represent a different fragment.