Bug 154798 - The ODF "country" attributes are invalid
Summary: The ODF "country" attributes are invalid
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ODF Languages
  Show dependency treegraph
 
Reported: 2023-04-13 22:23 UTC by Eyal Rozenberg
Modified: 2023-04-14 18:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2023-04-13 22:23:40 UTC
ODF defines a pair of attributes:

20.256 style:country-asian
20.257 style:country-complex

(I couldn't find style:country-latin)

which supposedly "specifies the country of a text." Yes, both of them.

This is problematic for three reasons:

1. Text doesn't have a country. Countries may be relevant if you want to specify local variants of languages; or locales (although those go more by state than by country if we want to nitpick). But text does not directly have a country.
2. Country is not a sub-feature of the "language group". Even if it is somehow legitimate to specify the "country" of a piece of text, then it's country-period, not a triplet of countries for 3 language groups. Not to mention how the same country can have large groups of people using multiple scripts, in each of the three groups (e.g. Indonesia).
3. Unless "country" is interpreted in the context of a locale - it is not a matter of style, but rather an aspect of the semantics, the contents, of the text. As such, this attribute should not be prefixed by "style:", and not be part of styles.

Highly related to 151290, but of course of much less significance.
Comment 1 Regina Henschel 2023-04-14 18:16:12 UTC
(In reply to Eyal Rozenberg from comment #0)
> ODF defines a pair of attributes:
> 
> 20.256 style:country-asian
> 20.257 style:country-complex
> 
> (I couldn't find style:country-latin)

These attributes are never used as single attributes. They are used as pair:
for 'latin'
20.188 fo:country
20.202 fo:language

for 'complex'
20.257 style:country-complex
20.303 style:language-complex

for 'asian'
20.256 style:country-asian
20.302 style:language-asian

The data type for 'language' is 'languageCode' (18.3.17). It refers to ISO 639.
The data type for 'country' is 'countryCode' in (18.3.11). It refers to ISO 3166.

You will read e.g. in 20.303
This attribute may be ignored if it is not specified together with a style:country-complex 20.257 attribute.
And the other way round in 20.257
It may be ignored if it is not specified together with a style:language-complex 20.303 attribute.