diff --git a/docs/ldml/tr35-info.md b/docs/ldml/tr35-info.md index 1b4c1b3cb52..d2584eac88a 100644 --- a/docs/ldml/tr35-info.md +++ b/docs/ldml/tr35-info.md @@ -1209,7 +1209,7 @@ Instructions for use are supplied in the header of the file. Different locales have different preferences for which unit or combination of units is used for a particular usage, such as measuring a person’s height. This is more fine-grained than merely a preference for metric versus US or UK measurement systems. For example, one locale may use meters alone, while another may use centimeters alone or a combination of meters and centimeters; a third may use inches alone, or (informally) a combination of feet and inches. The determination of preferred units uses the user preference data in [units.xml](https://github.com/unicode-org/cldr/blob/main/common/supplemental/units.xml) together with **input unit**, the **input unit usage**, and the **input locale identifer**. - * The _well-formed_ and _valid_ **units** are defined according to [Unit Syntax](tr35-general.html#unit-syntax). + * The _well-formed_ and _valid_ **units** are defined according to [Unit Syntax](tr35-general.md#unit-syntax). * The _well-formed_ **unit usages** are of the form [a-z0-9]{3-8}("-" [a-z0-9]{3-8})*. The _valid_ **unit usages** are the union of the set of `NMTOKENS` in the `usage` attribute value for the `unitPreferences` element in [units.xml](https://github.com/unicode-org/cldr/blob/main/common/supplemental/units.xml). For example, the following `unitPreferences` elements produce the set {default, floor, geograph, land}. diff --git a/docs/ldml/tr35-messageFormat.md b/docs/ldml/tr35-messageFormat.md index 7bc6951e80b..fbea45cff26 100644 --- a/docs/ldml/tr35-messageFormat.md +++ b/docs/ldml/tr35-messageFormat.md @@ -47,161 +47,153 @@ The LDML specification is divided into the following parts: ## Contents of Part 9, Message Format -- [Introduction](#introduction) - + [Conformance](#conformance) - + [Terminology and Conventions](#terminology-and-conventions) - + [Stability Policy](#stability-policy) -- [Syntax](#syntax) - + [Introduction](#introduction-1) - + [Design Goals](#design-goals) - + [Design Restrictions](#design-restrictions) - * [Messages and their Syntax](#messages-and-their-syntax) - + [Well-formed vs. Valid Messages](#well-formed-vs-valid-messages) - * [The Message](#the-message) - + [Declarations](#declarations) - + [Complex Body](#complex-body) - * [Pattern](#pattern) - + [Quoted Pattern](#quoted-pattern) - + [Text](#text) - + [Placeholder](#placeholder) - * [Matcher](#matcher) - + [Selector](#selector) - + [Variant](#variant) - - [Key](#key) - * [Expressions](#expressions) - + [Operand](#operand) - - [Function](#function) - * [Options](#options) - * [Markup](#markup) - * [Attributes](#attributes) - * [Other Syntax Elements](#other-syntax-elements) - + [Keywords](#keywords) - + [Literals](#literals) - + [Names and Identifiers](#names-and-identifiers) - + [Escape Sequences](#escape-sequences) - + [Whitespace](#whitespace) - * [Complete ABNF](#complete-abnf) -- [`message.abnf`](#-messageabnf-) -- [Formatting](#formatting) - * [Introduction](#introduction-2) - * [Formatting Context](#formatting-context) - * [Resolved Values](#resolved-values) - * [Expression and Markup Resolution](#expression-and-markup-resolution) - + [Literal Resolution](#literal-resolution) - + [Variable Resolution](#variable-resolution) - + [Function Resolution](#function-resolution) - - [Function Handler](#function-handler) - - [Option Resolution](#option-resolution) - + [Markup Resolution](#markup-resolution) - + [Fallback Resolution](#fallback-resolution) - * [Pattern Selection](#pattern-selection) - + [Resolve Selectors](#resolve-selectors) - + [Resolve Preferences](#resolve-preferences) - + [Filter Variants](#filter-variants) - + [Sort Variants](#sort-variants) - + [Examples](#examples) - - [Example 1](#example-1) - - [Example 2](#example-2) - - [Example 3](#example-3) - * [Formatting](#formatting-1) - + [Examples](#examples-1) - + [Formatting Fallback Values](#formatting-fallback-values) - + [Handling Bidirectional Text](#handling-bidirectional-text) -- [Errors](#errors) - * [Error Handling](#error-handling) - * [Syntax Errors](#syntax-errors) - * [Data Model Errors](#data-model-errors) - + [Variant Key Mismatch](#variant-key-mismatch) - + [Missing Fallback Variant](#missing-fallback-variant) - + [Missing Selector Annotation](#missing-selector-annotation) - + [Duplicate Declaration](#duplicate-declaration) - + [Duplicate Option Name](#duplicate-option-name) - + [Duplicate Variant](#duplicate-variant) - * [Resolution Errors](#resolution-errors) - + [Unresolved Variable](#unresolved-variable) - + [Unknown Function](#unknown-function) - + [Bad Selector](#bad-selector) - * [Message Function Errors](#message-function-errors) - + [Bad Operand](#bad-operand) - + [Bad Option](#bad-option) - + [Bad Variant Key](#bad-variant-key) - + [Unsupported Operation](#unsupported-operation) -- [MessageFormat 2.0 Default Function Registry](#messageformat-20-default-function-registry) - * [String Value Selection and Formatting](#string-value-selection-and-formatting) - + [The `:string` function](#the---string--function) - - [Operands](#operands) - - [Options](#options-1) - - [Resolved Value](#resolved-value) - - [Selection](#selection) - - [Formatting](#formatting-2) - * [Numeric Value Selection and Formatting](#numeric-value-selection-and-formatting) - + [The `:number` function](#the---number--function) - - [Operands](#operands-1) - - [Options](#options-2) - * [Default Value of `select` Option](#default-value-of--select--option) - * [Percent Style](#percent-style) - - [Resolved Value](#resolved-value-1) - - [Selection](#selection-1) - + [The `:integer` function](#the---integer--function) - - [Operands](#operands-2) - - [Options](#options-3) - * [Default Value of `select` Option](#default-value-of--select--option-1) - * [Percent Style](#percent-style-1) - - [Resolved Value](#resolved-value-2) - - [Selection](#selection-2) - + [The `:math` function](#the---math--function) - - [Operands](#operands-3) - - [Options](#options-4) - - [Resolved Value](#resolved-value-3) - - [Selection](#selection-3) - + [The `:currency` function](#the---currency--function) - - [Operands](#operands-4) - - [Options](#options-5) - - [Resolved Value](#resolved-value-4) - - [Selection](#selection-4) - + [The `:unit` function](#the---unit--function) - - [Operands](#operands-5) - - [Options](#options-6) - - [Resolved Value](#resolved-value-5) - - [Selection](#selection-5) - - [Unit Conversion](#unit-conversion) - + [Number Operands](#number-operands) - + [Digit Size Options](#digit-size-options) - + [Number Selection](#number-selection) - - [Rule Selection](#rule-selection) - - [Exact Literal Match Serialization](#exact-literal-match-serialization) - * [Date and Time Value Formatting](#date-and-time-value-formatting) - + [The `:datetime` function](#the---datetime--function) - - [Operands](#operands-6) - - [Options](#options-7) - * [Style Options](#style-options) - * [Field Options](#field-options) - - [Resolved Value](#resolved-value-6) - + [The `:date` function](#the---date--function) - - [Operands](#operands-7) - - [Options](#options-8) - - [Resolved Value](#resolved-value-7) - + [The `:time` function](#the---time--function) - - [Operands](#operands-8) - - [Options](#options-9) - - [Resolved Value](#resolved-value-8) - + [Date and Time Operands](#date-and-time-operands) - + [Date and Time Override Options](#date-and-time-override-options) -- [MessageFormat 2.0 Unicode Namespace](#messageformat-20-unicode-namespace) - * [Options](#options-10) - + [`u:id`](#-u-id-) - + [`u:locale`](#-u-locale-) - + [`u:dir`](#-u-dir-) -- [MessageFormat 2.0 Data Model](#messageformat-20-data-model) - * [Messages](#messages) - * [Patterns](#patterns) - * [Expressions](#expressions-1) - * [Markup](#markup-1) - * [Attributes](#attributes-1) - * [Extensions](#extensions) -- [Appendices](#appendices) - * [Security Considerations](#security-considerations) - * [Acknowledgements](#acknowledgements) +* [Introduction](#introduction) + * [Conformance](#conformance) + * [Terminology and Conventions](#terminology-and-conventions) + * [Stability Policy](#stability-policy) + * [Introduction](#introduction) + * [Design Goals](#design-goals) + * [Design Restrictions](#design-restrictions) +* [Messages and their Syntax](#messages-and-their-syntax) + * [Well-formed vs. Valid Messages](#well-formed-vs.-valid-messages) +* [The Message](#the-message) + * [Declarations](#declarations) + * [Complex Body](#complex-body) +* [Pattern](#pattern) + * [Quoted Pattern](#quoted-pattern) + * [Text](#text) + * [Placeholder](#placeholder) +* [Matcher](#matcher) + * [Selector](#selector) + * [Variant](#variant) + * [Key](#key) +* [Expressions](#expressions) + * [Operand](#operand) + * [Function](#function) + * [Options](#options) +* [Markup](#markup) +* [Attributes](#attributes) +* [Other Syntax Elements](#other-syntax-elements) + * [Keywords](#keywords) + * [Literals](#literals) + * [Names and Identifiers](#names-and-identifiers) + * [Escape Sequences](#escape-sequences) + * [Whitespace](#whitespace) +* [Complete ABNF](#complete-abnf) +* [Introduction](#introduction) +* [Formatting Context](#formatting-context) +* [Resolved Values](#resolved-values) +* [Expression and Markup Resolution](#expression-and-markup-resolution) + * [Literal Resolution](#literal-resolution) + * [Variable Resolution](#variable-resolution) + * [Function Resolution](#function-resolution) + * [Function Handler](#function-handler) + * [Option Resolution](#option-resolution) + * [Markup Resolution](#markup-resolution) + * [Fallback Resolution](#fallback-resolution) +* [Pattern Selection](#pattern-selection) + * [Resolve Selectors](#resolve-selectors) + * [Resolve Preferences](#resolve-preferences) + * [Filter Variants](#filter-variants) + * [Sort Variants](#sort-variants) + * [Examples](#examples) + * [Example 1](#example-1) + * [Example 2](#example-2) + * [Example 3](#example-3) +* [Formatting](#formatting) + * [Examples](#examples) + * [Formatting Fallback Values](#formatting-fallback-values) + * [Handling Bidirectional Text](#handling-bidirectional-text) +* [Error Handling](#error-handling) +* [Syntax Errors](#syntax-errors) +* [Data Model Errors](#data-model-errors) + * [Variant Key Mismatch](#variant-key-mismatch) + * [Missing Fallback Variant](#missing-fallback-variant) + * [Missing Selector Annotation](#missing-selector-annotation) + * [Duplicate Declaration](#duplicate-declaration) + * [Duplicate Option Name](#duplicate-option-name) + * [Duplicate Variant](#duplicate-variant) +* [Resolution Errors](#resolution-errors) + * [Unresolved Variable](#unresolved-variable) + * [Unknown Function](#unknown-function) + * [Bad Selector](#bad-selector) +* [Message Function Errors](#message-function-errors) + * [Bad Operand](#bad-operand) + * [Bad Option](#bad-option) + * [Bad Variant Key](#bad-variant-key) + * [Unsupported Operation](#unsupported-operation) +* [String Value Selection and Formatting](#string-value-selection-and-formatting) + * [The `:string` function](#the-string-function) + * [Operands](#operands) + * [Options](#options) + * [Resolved Value](#resolved-value) + * [Selection](#selection) + * [Formatting](#formatting) +* [Numeric Value Selection and Formatting](#numeric-value-selection-and-formatting) + * [The `:number` function](#the-number-function) + * [Operands](#operands) + * [Options](#options) + * [Default Value of `select` Option](#default-value-of-select-option) + * [Percent Style](#percent-style) + * [Resolved Value](#resolved-value) + * [Selection](#selection) + * [The `:integer` function](#the-integer-function) + * [Operands](#operands) + * [Options](#options) + * [Default Value of `select` Option](#default-value-of-select-option) + * [Percent Style](#percent-style) + * [Resolved Value](#resolved-value) + * [Selection](#selection) + * [The `:math` function](#the-math-function) + * [Operands](#operands) + * [Options](#options) + * [Resolved Value](#resolved-value) + * [Selection](#selection) + * [The `:currency` function](#the-currency-function) + * [Operands](#operands) + * [Options](#options) + * [Resolved Value](#resolved-value) + * [Selection](#selection) + * [The `:unit` function](#the-unit-function) + * [Operands](#operands) + * [Options](#options) + * [Resolved Value](#resolved-value) + * [Selection](#selection) + * [Unit Conversion](#unit-conversion) + * [Number Operands](#number-operands) + * [Digit Size Options](#digit-size-options) + * [Number Selection](#number-selection) + * [Rule Selection](#rule-selection) + * [Exact Literal Match Serialization](#exact-literal-match-serialization) +* [Date and Time Value Formatting](#date-and-time-value-formatting) + * [The `:datetime` function](#the-datetime-function) + * [Operands](#operands) + * [Options](#options) + * [Style Options](#style-options) + * [Field Options](#field-options) + * [Resolved Value](#resolved-value) + * [The `:date` function](#the-date-function) + * [Operands](#operands) + * [Options](#options) + * [Resolved Value](#resolved-value) + * [The `:time` function](#the-time-function) + * [Operands](#operands) + * [Options](#options) + * [Resolved Value](#resolved-value) + * [Date and Time Operands](#date-and-time-operands) + * [Date and Time Override Options](#date-and-time-override-options) +* [Options](#options) + * [`u:id`](#uid) + * [`u:locale`](#ulocale) + * [`u:dir`](#udir) +* [Messages](#messages) +* [Patterns](#patterns) +* [Expressions](#expressions) +* [Markup](#markup) +* [Attributes](#attributes) +* [Extensions](#extensions) +* [Security Considerations](#security-considerations) +* [Acknowledgements](#acknowledgements) ## Introduction @@ -3447,7 +3439,7 @@ or it can be a [Number Operand](#number-operands), as long as the _option_ `unit` is provided. The value of the _operand_'s `unit` SHOULD be either a string containing a -valid [Unit Identifier](https://www.unicode.org/reports/tr35/tr35-general.html#unit-identifiers) +valid [Unit Identifier](tr35-general.md#unit-identifiers) or an implementation-defined unit type. A [Number Operand](#number-operands) without a `unit` _option_ results in a _Bad Operand_ error. @@ -3488,10 +3480,10 @@ The following options and their values are required to be available on the funct - `plural` (default) - `exact` - `unit` - - valid [Unit Identifier](https://www.unicode.org/reports/tr35/tr35-general.html#unit-identifiers) + - valid [Unit Identifier](tr35-general.md#unit-identifiers) (no default) - `usage` \[RECOMMENDED\] - - valid [Unicode Unit Preference](https://www.unicode.org/reports/tr35/tr35-info.html#unit-preferences) + - valid [Unicode Unit Preference](tr35-info.md#unit-preferences) (no default, see [Unit Conversion](#unit-conversion) below) - `unitDisplay` - `short` (default) @@ -4067,7 +4059,7 @@ available in the functions `:datetime`, `:date`, and `:time`. - `timeZone` - A valid time zone identifier (see [TZDB](https://www.iana.org/time-zones) - and [LDML](https://www.unicode.org/reports/tr35/tr35-dates.html#Time_Zone_Names) + and [LDML](tr35-dates.md#Time_Zone_Names) for information on identifiers) - `local` - `UTC` diff --git a/docs/ldml/tr35.md b/docs/ldml/tr35.md index dd5eaaed97f..1a33b28d0d5 100644 --- a/docs/ldml/tr35.md +++ b/docs/ldml/tr35.md @@ -220,6 +220,7 @@ The LDML specification is divided into the following parts: * [References](#References) * [Acknowledgments](#Acknowledgments) * [Modifications](#Modifications) + * [Well-formed identifiers](#well-formed-identifiers) * [Conformance Modifications](#conformance-modifications) * [Locale Identifiers and Inheritance Modifications](#locale-identifiers-and-inheritance-modifications) * [Message Format Modifications](#message-format-modifications) @@ -4358,7 +4359,7 @@ Other contributors to CLDR are listed on the [CLDR Project Page](https://www.uni - Change the constraints into either well-formedness constraints or validity constraints. - Add validity constraints for base-component. - Reformat the EBNF to avoid using HTML tables. -- Updated the [Unit_Preferences](tr35-info.html#Unit_Preferences) to provide well-formedness and validity definitions. +- Updated the [Unit_Preferences](tr35-info.md#Unit_Preferences) to provide well-formedness and validity definitions. **Changes in LDML Version 46 (Differences from Version 45)**