diff --git a/spec/registry.md b/spec/registry.md index b00a1aeab2..04f65ad876 100644 --- a/spec/registry.md +++ b/spec/registry.md @@ -422,6 +422,20 @@ The following options and their values are required to be available on the funct - `maximumSignificantDigits` - ([digit size option](#digit-size-options)) +If the _operand_ of the _expression_ is an implementation-defined type, +such as the _resolved value_ of an _expression_ with a `:number` or `:integer` _annotation_, +it can include option values. +These are included in the resolved option values of the _expression_, +with _options_ on the _expression_ taking priority over any option values of the _operand_. + +> For example, the _placeholder_ in this _message_: +> ``` +> .input {$n :number notation=scientific minimumFractionDigits=2} +> {{{$n :number minimumFractionDigits=1}}} +> ``` +> would be formatted with the resolved options +> `{ notation: 'scientific', minimumFractionDigits: '1' }`. + > [!NOTE] > The following options and option values are being developed during the Technical Preview > period. @@ -489,6 +503,14 @@ MUST be multiplied by 100 for the purposes of formatting. The _function_ `:number` performs selection as described in [Number Selection](#number-selection) below. +#### Composition + +When an _operand_ or an _option_ value uses a _variable_ annotated, +directly or indirectly, by a `:number` _annotation_, +its _resolved value_ contains an implementation-defined numerical value +of the _operand_ of the annotated _expression_, +together with the resolved options' values. + ### The `:integer` function The function `:integer` is a selector and formatter for matching or formatting numeric @@ -498,7 +520,6 @@ values as integers. The function `:integer` requires a [Number Operand](#number-operands) as its _operand_. - #### Options Some options do not have default values defined in this specification. @@ -538,6 +559,18 @@ function `:integer`: - `maximumSignificantDigits` - ([digit size option](#digit-size-options)) +If the _operand_ of the _expression_ is an implementation-defined type, +such as the _resolved value_ of an _expression_ with a `:number` or `:integer` _annotation_, +it can include option values. +In general, these are included in the resolved option values of the _expression_, +with _options_ on the _expression_ taking priority over any option values of the _operand_. +Option values with the following names are however discarded if included in the _operand_: +- `compactDisplay` +- `notation` +- `minimumFractionDigits` +- `maximumFractionDigits` +- `minimumSignificantDigits` + > [!NOTE] > The following options and option values are being developed during the Technical Preview > period. @@ -605,6 +638,14 @@ MUST be multiplied by 100 for the purposes of formatting. The _function_ `:integer` performs selection as described in [Number Selection](#number-selection) below. +#### Composition + +When an _operand_ or an _option_ value uses a _variable_ annotated, +directly or indirectly, by a `:integer` _annotation_, +its _resolved value_ contains the implementation-defined integer value +of the _operand_ of the annotated _expression_, +together with the resolved options' values. + ### Number Operands The _operand_ of a number function is either an implementation-defined type or