Skip to content

Commit

Permalink
CLDR-17091 kbd: move names into info name="…"
Browse files Browse the repository at this point in the history
- drop the <names> element
- make <info> required
- add <info name="…"> as a required attribute
- update docs and dtd
  • Loading branch information
srl295 committed Oct 3, 2023
1 parent 98628f9 commit b40d91e
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 166 deletions.
90 changes: 22 additions & 68 deletions docs/ldml/tr35-keyboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ The LDML specification is divided into the following parts:
* [Element: locale](#Element_locale)
* [Element: version](#Element_version)
* [Element: info](#Element_info)
* [Element: names](#Element_names)
* [Element: name](#Element_name)
* [Element: settings](#Element_settings)
* [Element: keys](#Element_keys)
* [Element: key](#Element_key)
Expand Down Expand Up @@ -334,7 +332,7 @@ This is the top level element. All other elements defined below are under this e
>
> Parents: _none_
>
> Children: [displays](#Element_displays), [import](#Element_import), [info](#Element_info), [keys](#Element_keys), [layers](#Element_layers), [locales](#Element_locales), [names](#Element_names), [settings](#Element_settings), [_special_](tr35.md#special), [transforms](#Element_transforms), [variables](#Element_variables), [version](#Element_version)
> Children: [displays](#Element_displays), [import](#Element_import), [info](#Element_info), [keys](#Element_keys), [layers](#Element_layers), [locales](#Element_locales), [settings](#Element_settings), [_special_](tr35.md#special), [transforms](#Element_transforms), [variables](#Element_variables), [version](#Element_version)
>
> Occurrence: required, single
>
Expand Down Expand Up @@ -485,7 +483,9 @@ Element containing informative properties about the layout, for displaying in us
**Syntax**

```xml
<info author="{author}"
<info
name="{keyboard name}"
author="{author}"
layout="{hint of the layout}"
indicator="{short identifier}" />
```
Expand All @@ -496,10 +496,27 @@ Element containing informative properties about the layout, for displaying in us
>
> Children: _none_
>
> Occurrence: optional, single
> Occurrence: required, single
>
> </small>
_Attribute:_ `name` (required)

> This is the only required attribute.
>
> This name is not localized, but is an informative name for the keyboard.
```xml
<keyboard3 locale="bg-t-k0-phonetic-trad">
<info name="Bulgarian (Phonetic Traditional)" />
</keyboard3>
```

* * *


_Attribute:_ `author`

> The `author` attribute contains the name of the author of the layout file.
Expand All @@ -519,69 +536,6 @@ _Attribute:_ `indicator`
* * *

### <a name="Element_names" href="#Element_names">Element: names</a>

Element used to store any names given to the layout.

These names are not localized but are informative names for the keyboard. Localization of these names would be done as separate data items elsewhere in CLDR.

**Syntax**

```xml
<names>
{set of name elements}
</names>
```

> <small>
>
> Parents: [keyboard3](#Element_keyboard)
>
> Children: [name](#Element_name), [_special_](tr35.md#special)
>
> Occurrence: required, single
>
> </small>
### <a name="Element_name" href="#Element_name">Element: name</a>

A single name given to the layout.

**Syntax**

```xml
<name value="..">
```

> <small>
>
> Parents: [names](#Element_names)
>
> Children: _none_
>
> Occurrence: required, multiple
>
> </small>
_Attribute:_ `value` (required)

> The name of the layout.

**Example**

```xml
<keyboard3 locale="bg-t-k0-phonetic-trad">
<names>
<name value="Bulgarian (Phonetic Traditional)" />
</names>
</keyboard3>
```

* * *

### <a name="Element_settings" href="#Element_settings">Element: settings</a>

An element used to keep track of layout-specific settings by implementations. This element may or may not show up on a layout. These settings reflect the normal practice by the implementation. However, an implementation using the data may customize the behavior.
Expand Down
6 changes: 1 addition & 5 deletions keyboards/3.0/fr-t-k0-azerty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
keyboard formats -->
<!-- 'version' element is now optional -->
<version number="1.0.0" />
<info author="Team Keyboard" layout="AZERTY" indicator="FR" />
<names>
<name value="French Test" />
<name value="French Test AZERTY" />
</names>
<info name="French Test AZERTY" author="Team Keyboard" layout="AZERTY" indicator="FR" />

<displays>
<!-- Note: displays is only used for keycap presentation -->
Expand Down
5 changes: 1 addition & 4 deletions keyboards/3.0/ja-Latn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<locale id="en" />
</locales>
<version number="0.0.0" />
<names>
<!-- this is the Romaji (English) layer of the JIS keyboard -->
<name value="Romaji (JIS)" />
</names>
<info name="Romaji (JIS)" />

<keys>
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
Expand Down
8 changes: 2 additions & 6 deletions keyboards/3.0/mt-t-k0-47key.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
<!-- English is also an official language in Malta.-->
<locale id="en" />
</locales>
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<names>
<name value="Maltese 47-key" />
<name value="MSA 100:2002 47-key" />
</names>
<info name="Maltese 47-key" author="Steven R. Loomis" layout="QWERTY" indicator="MT" />
<!-- MSA 100:2002 -->

<keys>
<!-- imports -->
Expand Down
8 changes: 2 additions & 6 deletions keyboards/3.0/mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
<!-- English is also an official language in Malta.-->
<locale id="en" />
</locales>
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<names>
<name value="Maltese" />
<name value="MSA 100:2002" />
</names>
<info name="Maltese" author="Steven R. Loomis" layout="QWERTY" indicator="MT" />
<!-- MSA 100:2002 -->

<keys>
<!-- imports -->
Expand Down
5 changes: 1 addition & 4 deletions keyboards/3.0/pcm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
<!DOCTYPE keyboard3 SYSTEM '../dtd/ldmlKeyboard3.dtd'>
<keyboard3 locale="pcm" conformsTo="techpreview">
<version number="1.0.0" />
<names>
<name value="Nigerian Pidgin" />
<name value="Naijíriá Píjin" />
</names>
<info name="Naijíriá Píjin" />
<keys>
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
Expand Down
5 changes: 1 addition & 4 deletions keyboards/3.0/pt-t-k0-abnt2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<locale id="pt" />
</locales>
<version number="0.0.0" />
<names>
<name value="Portuguese (Brazil) (ABNT2)" />
</names>

<info name="Portuguese (Brazil) (ABNT2)" />
<displays>
<display to="\m{acute}" display="´"/>
<display to="\m{grave}" display="`"/>
Expand Down
12 changes: 5 additions & 7 deletions keyboards/dtd/ldmlKeyboard.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ CLDR data files are interpreted according to the LDML specification (http://unic
<!--@DEPRECATED-->

<!ELEMENT info EMPTY >

<!ATTLIST info name CDATA #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->

<!ATTLIST info author CDATA #IMPLIED >
<!--@VALUE-->
<!ATTLIST info normalization CDATA #IMPLIED >
Expand All @@ -41,13 +46,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic
<!ATTLIST info indicator CDATA #IMPLIED >
<!--@VALUE-->

<!ELEMENT names ( name+ ) >

<!ELEMENT name EMPTY >
<!ATTLIST name value CDATA #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->

<!ELEMENT settings EMPTY >
<!--@ORDERED-->
<!ATTLIST settings fallback (omit) #IMPLIED >
Expand Down
22 changes: 7 additions & 15 deletions keyboards/dtd/ldmlKeyboard3.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The CLDR Keyboard Subcommittee is currently developing major changes to the CLDR
Please view the subcommittee page for the most recent information.
<https://cldr.unicode.org/index/keyboard-workgroup> -->

<!ELEMENT keyboard3 ( import*, locales?, version?, info?, names, settings?, displays?, keys?, forms?, layers*, variables?, transforms*, special* ) >
<!ELEMENT keyboard3 ( import*, locales?, version?, info, settings?, displays?, keys?, forms?, layers*, variables?, transforms*, special* ) >
<!--@TECHPREVIEW-->
<!ATTLIST keyboard3 locale CDATA #REQUIRED >
<!--@MATCH:validity/bcp47-wellformed-->
Expand Down Expand Up @@ -45,6 +45,9 @@ Please view the subcommittee page for the most recent information.

<!ELEMENT info EMPTY >
<!--@TECHPREVIEW-->
<!ATTLIST info name CDATA #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->
<!ATTLIST info author CDATA #IMPLIED >
<!--@MATCH:any-->
<!--@VALUE-->
Expand All @@ -55,26 +58,12 @@ Please view the subcommittee page for the most recent information.
<!--@MATCH:any-->
<!--@VALUE-->

<!ELEMENT names ( import*, name+, special* ) >
<!--@TECHPREVIEW-->

<!ELEMENT name EMPTY >
<!--@ORDERED-->
<!--@TECHPREVIEW-->
<!ATTLIST name value CDATA #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->

<!ELEMENT special ANY >
<!--@TECHPREVIEW-->

<!ELEMENT settings EMPTY >
<!--@ORDERED-->
<!--@TECHPREVIEW-->
<!ATTLIST settings normalization (disabled) #IMPLIED >
<!--@VALUE-->


<!ELEMENT displays ( import*, display*, displayOptions*, special* ) >
<!--@TECHPREVIEW-->

Expand All @@ -97,6 +86,9 @@ Please view the subcommittee page for the most recent information.
<!--@VALUE-->
<!--@ALLOWS_UESC-->

<!ELEMENT special ANY >
<!--@TECHPREVIEW-->

<!ELEMENT keys ( import*, ( key | flicks )*, special* ) >
<!--@TECHPREVIEW-->

Expand Down
25 changes: 4 additions & 21 deletions keyboards/dtd/ldmlKeyboard3.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element maxOccurs="unbounded" minOccurs="0" ref="import"/>
<xs:element minOccurs="0" ref="locales"/>
<xs:element minOccurs="0" ref="version"/>
<xs:element minOccurs="0" ref="info"/>
<xs:element ref="names"/>
<xs:element ref="info"/>
<xs:element minOccurs="0" ref="settings"/>
<xs:element minOccurs="0" ref="displays"/>
<xs:element minOccurs="0" ref="keys"/>
Expand Down Expand Up @@ -97,6 +96,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file

<xs:element name="info">
<xs:complexType>
<xs:attribute name="name" use="required"/>
<xs:attribute name="author"/>
<xs:attribute name="layout"/>
<xs:attribute name="indicator"/>
Expand All @@ -109,27 +109,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file



<xs:element name="names">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="import"/>
<xs:element maxOccurs="unbounded" ref="name"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="special"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="name">
<xs:complexType>
<xs:attribute name="value" use="required"/>
</xs:complexType>
</xs:element>




<xs:element name="special" type="any"/>

<xs:element name="settings">
<xs:complexType>
<xs:attribute name="normalization">
Expand Down Expand Up @@ -178,6 +159,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file



<xs:element name="special" type="any"/>

<xs:element name="keys">
<xs:complexType>
<xs:sequence>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
<!-- English is also an official language in Malta.-->
<locale id="en" />
</locales>
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<names>
<name value="Maltese (48-key)" />
<!-- <name value="MSA 100:2002" /> -->
</names>
<info name="Broken Import Test" author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<keys>
<!-- imports -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
<!-- English is also an official language in Malta.-->
<locale id="en" />
</locales>
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<names>
<name value="Maltese (48-key)" />
<!-- <name value="MSA 100:2002" /> -->
</names>
<info name="Broken Test" author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<keys>
<!-- imports -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
<!-- English is also an official language in Malta.-->
<locale id="en" />
</locales>
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" />
<info name="Maltese (48-key)" author="Steven R. Loomis" layout="QWERTY" indicator="MT" />

<names>
<name value="Maltese (48-key)" />
<!-- <name value="MSA 100:2002" /> -->
</names>
<!-- MSA 100:2002 -->

<keys>
<!-- imports -->
Expand Down
Loading

0 comments on commit b40d91e

Please sign in to comment.