// where [ and ] are the begin and end quotes.
BeginEndQuote quotes = transform.getOldQuotes();
String firstPart = quotes.begin + StringUtils.substringBetween(name, quotes.begin, quotes.end) + quotes.end;
if (name.equals(firstPart)) {
// Case I
return quotes.unescapeName(firstPart);
} else {
// Case II
String secondPart = StringUtils.substringAfter(name, firstPart);
secondPart = StringUtils.removeStart(secondPart, ".");
return quotes.unescapeName(secondPart);