docs: @Override
  	public IdDt withVersion(String theVersion) {
  		if (isBlank(theVersion)) {
  			return toVersionless();
  		}
  
  		if (isLocal() || isUrn()) {
  			return new IdDt(getValueAsString());
  		}
  
  		String existingValue = getValue();
  
  		int i = existingValue.indexOf(Constants.PARAM_HISTORY);
  		String value;
  		if (i > 1) {
  			value = existingValue.substring(0, i - 1);
  		} else {
  			value = existingValue;
  		}
  
  		return new IdDt(value + '/' + Constants.PARAM_HISTORY + '/' + theVersion);
  	}