@@ -53,9 +53,9 @@ nor be made available to function implementations.
5353> value of a given _ expression_ until it is actually used by a
5454> selection or formatting process.
5555> However, when an _ expression_ is resolved, it MUST behave as if all preceding
56- > _ declarations_ and _ selectors _ affecting _ variables_ referenced by that _ expression_
56+ > _ declarations_ affecting _ variables_ referenced by that _ expression_
5757> have already been evaluated in the order in which the relevant _ declarations_
58- > and _ selectors _ appear in the _ message_ .
58+ > appear in the _ message_ .
5959
6060## Formatting Context
6161
@@ -85,7 +85,7 @@ Implementations MAY include additional fields in their _formatting context_.
8585
8686## Expression and Markup Resolution
8787
88- _ Expressions_ are used in _ declarations_ , _ selectors _ , and _ patterns_ .
88+ _ Expressions_ are used in _ declarations_ and _ patterns_ .
8989_ Markup_ is only used in _ patterns_ .
9090
9191In a _ declaration_ , the resolved value of the _ expression_ is bound to a _ variable_ ,
@@ -97,8 +97,6 @@ In an _input-declaration_, the _variable_ operand of the _variable-expression_
9797identifies not only the name of the external input value,
9898but also the _ variable_ to which the resolved value of the _ variable-expression_ is bound.
9999
100- In _ selectors_ , the resolved value of an _ expression_ is used for _ pattern selection_ .
101-
102100In a _ pattern_ , the resolved value of an _ expression_ or _ markup_ is used in its _ formatting_ .
103101
104102The form that resolved values take is implementation-dependent,
@@ -429,7 +427,8 @@ according to their _key_ values and selecting the first one.
429427> > For example, in the `pl` (Polish) locale, this _message_ cannot reach
430428> > the `*` _variant_:
431429> > ```
432- > > .match {$num :integer}
430+ > > .input {$num :integer}
431+ > > .match $num
433432> > 0 {{ }}
434433> > one {{ }}
435434> > few {{ }}
@@ -449,13 +448,16 @@ Each _key_ corresponds to a _selector_ by its position in the _variant_.
449448> For example, in this message:
450449>
451450> ```
452- > .match {:one} {:two} {:three}
451+ > .input {$one :number}
452+ > .input {$two :number}
453+ > .input {$three :number}
454+ > .match $one $two $three
453455> 1 2 3 {{ ... }}
454456> ```
455457>
456- > The first _key_ `1` corresponds to the first _selector_ (`{: one} `),
457- > the second _key_ `2` to the second _selector_ (`{: two} `),
458- > and the third _key_ `3` to the third _selector_ (`{: three} `).
458+ > The first _key_ `1` corresponds to the first _selector_ (`$ one`),
459+ > the second _key_ `2` to the second _selector_ (`$ two`),
460+ > and the third _key_ `3` to the third _selector_ (`$ three`).
459461
460462To determine which _variant_ best matches a given set of inputs,
461463each _selector_ is used in turn to order and filter the list of _variants_.
@@ -468,15 +470,6 @@ Earlier _selectors_ in the _matcher_'s list of _selectors_ have a higher priorit
468470When all of the _selectors_ have been processed,
469471the earliest-sorted _variant_ in the remaining list of _variants_ is selected.
470472
471- > [!NOTE]
472- > A _selector_ is not a _declaration_.
473- > Even when the same _function_ can be used for both formatting and selection
474- > of a given _operand_
475- > the _annotation_ that appears in a _selector_ has no effect on subsequent
476- > _selectors_ nor on the formatting used in _placeholders_.
477- > To use the same value for selection and formatting,
478- > set its value with a `.input` or `.local` _declaration_.
479-
480473This selection method is defined in more detail below.
481474An implementation MAY use any pattern selection method,
482475as long as its observable behavior matches the results of the method defined here.
@@ -600,7 +593,9 @@ the variable reference `$bar` resolves to the string `'bar'`,
600593pattern selection proceeds as follows for this message:
601594
602595```
603- .match {$foo : string } {$bar : string }
596+ .input {$foo : string }
597+ .input {$bar : string }
598+ .match $foo $bar
604599bar bar {{All bar}}
605600foo foo {{All foo}}
606601* * {{Otherwise}}
@@ -631,7 +626,9 @@ Alternatively, with the same implementation and formatting context as in Example
631626pattern selection would proceed as follows for this message:
632627
633628```
634- .match {$foo : string } {$bar : string }
629+ .input {$foo : string }
630+ .input {$bar : string }
631+ .match $foo $bar
635632* bar {{Any and bar}}
636633foo * {{Foo and any}}
637634foo bar {{Foo and bar}}
@@ -680,7 +677,7 @@ the pattern selection proceeds as follows for this message:
680677
681678```
682679.input {$count : number }
683- .match { $count}
680+ .match $count
684681one {{Category match for {$count}}}
6856821 {{Exact match for {$count}}}
686683* {{Other match for {$count}}}
0 commit comments