@@ -153,6 +153,20 @@ The following options and their values are required to be available on the funct
153
153
- `maximumSignificantDigits`
154
154
- ([digit size option](#digit-size-options))
155
155
156
+ If the _operand_ of the _expression_ is an implementation-defined type,
157
+ such as the _resolved value_ of an _expression_ with a `:number` or `:integer` _annotation_,
158
+ it can include option values.
159
+ These are included in the resolved option values of the _expression_,
160
+ with _options_ on the _expression_ taking priority over any option values of the _operand_.
161
+
162
+ > For example, the _placeholder_ in this _message_:
163
+ > ```
164
+ > .input {$n :number notation=scientific minimumFractionDigits=2}
165
+ > {{{$n :number minimumFractionDigits=1}}}
166
+ > ```
167
+ > would be formatted with the resolved options
168
+ > `{ notation: 'scientific', minimumFractionDigits: '1' }`.
169
+
156
170
> [!NOTE]
157
171
> The following options and option values are being developed during the Technical Preview
158
172
> period.
@@ -221,6 +235,14 @@ MUST be multiplied by 100 for the purposes of formatting.
221
235
222
236
The _function_ `:number` performs selection as described in [Number Selection](#number-selection) below.
223
237
238
+ #### Composition
239
+
240
+ When an _operand_ or an _option_ value uses a _variable_ annotated,
241
+ directly or indirectly, by a `:number` _annotation_,
242
+ its _resolved value_ contains an implementation-defined numerical value
243
+ of the _operand_ of the annotated _expression_,
244
+ together with the resolved options' values.
245
+
224
246
### The `:integer` function
225
247
226
248
The function `:integer` is a selector and formatter for matching or formatting numeric
@@ -230,7 +252,6 @@ values as integers.
230
252
231
253
The function `:integer` requires a [Number Operand](#number-operands) as its _operand_.
232
254
233
-
234
255
#### Options
235
256
236
257
Some options do not have default values defined in this specification.
@@ -270,6 +291,18 @@ function `:integer`:
270
291
- `maximumSignificantDigits`
271
292
- ([digit size option](#digit-size-options))
272
293
294
+ If the _operand_ of the _expression_ is an implementation-defined type,
295
+ such as the _resolved value_ of an _expression_ with a `:number` or `:integer` _annotation_,
296
+ it can include option values.
297
+ In general, these are included in the resolved option values of the _expression_,
298
+ with _options_ on the _expression_ taking priority over any option values of the _operand_.
299
+ Option values with the following names are however discarded if included in the _operand_:
300
+ - `compactDisplay`
301
+ - `notation`
302
+ - `minimumFractionDigits`
303
+ - `maximumFractionDigits`
304
+ - `minimumSignificantDigits`
305
+
273
306
> [!NOTE]
274
307
> The following options and option values are being developed during the Technical Preview
275
308
> period.
@@ -338,6 +371,14 @@ MUST be multiplied by 100 for the purposes of formatting.
338
371
339
372
The _function_ `:integer` performs selection as described in [Number Selection](#number-selection) below.
340
373
374
+ #### Composition
375
+
376
+ When an _operand_ or an _option_ value uses a _variable_ annotated,
377
+ directly or indirectly, by a `:integer` _annotation_,
378
+ its _resolved value_ contains the implementation-defined integer value
379
+ of the _operand_ of the annotated _expression_,
380
+ together with the resolved options' values.
381
+
341
382
### Number Operands
342
383
343
384
The _operand_ of a number function is either an implementation-defined type or
0 commit comments