Description
Bolded is the original source.
Duplicate Variant: ... Literal keys are compared by their contents, not their syntactical appearance.
I think this needs some clarification. The interpretation of a literal depends on the function it is supplied to. Thus 'contents' in that sense is not a data model error. I think what is meant is that |a| is equivalent to a.
If we change "contents" to "value" that helps. We do have the following, although that isn't exactly what we need; and it is off in the Data Model.
Literal represents all literal values, both quoted literal and unquoted literal. The presence or absence of quotes is not preserved by the data model. The value of Literal is the "cooked" value (i.e. escape sequences are processed).
I suggest the following changes.
-
In the bold quoted line, change "contents" to "values".
-
In https://unicode.org/reports/tr35/dev/tr35-messageFormat.html#literals, add at the end of the section.
The value of a literal is the text after removing the terminating | characters if the literal is quoted, then unescaping any escaped characters.
An unquoted literal MAY be used when the content of the literal contains no whitespace and otherwise matches the
unquoted-literal
production.
This is misleading: should be:
An unquoted literal MAY be used when the content of the literal matches the unquoted-literal production. It will thus contain no whitespace, nor certain other characters.