Since this path is going to be used as uri, looks like has more sense switch BASE_PATH to TARGETURI and apply normalize_uri, hasn't it?