[Fwd: [I18n]An XKB layouts (variants, models, etc.) description.]

Simos Xenitellis simos74 at gmx.net
Fri Mar 29 15:44:30 EET 2002


-----Προωθημένο Μήνυμα-----

From: Ivan Pascal <pascal at info.tsu.ru>
To: i18n at xfree86.org
Subject: [I18n]An XKB layouts (variants, models, etc.) description.
Date: 29 Mar 2002 18:26:14 +0700

  Hi,

  I'd like to talk about one XKB issue.
I have correspondence with two guys who write and maintain GUI applications
for the XKB based keyboard layouts switching and configuring.
  Such applications need a complete list of all possible names of the XKB
models, layouts, variants and options (or better - their descriptions).
  Of course, there is such list in a xkb/rules/xfree86.lst file (or in
similar files). And even there is one undocumented function in an xkbfile
library that deals with this file and returns names and descriptions as
simple arrays of string.

  But this simple API needs some improvements and moreover the *.lst file
format needs some changes.
  First of all the file contains (and the function returns) the variants
description list as a one global section.  Actually it is almost empty and
the reason is clear.  The 'variant' here means 'the variant of a particular
layout map' and a variants list can differ (and really is different) for
different layouts.  Thus the variants list should be a subsection of each
layout description or each variant description in the global list should
have an attribute which points to the layout where this variant actually
makes sense.

  Also the options list actually is not a plain list. It contains particular
options descriptions and common descriptions for 'groups of options' mixed.
Since the API function returns all those descriptions as plain list each
application needs do some additional parsing for such list.

  Since the API and the *.lst file need be changed we decided don't invent
own format but use an XML for the description file.  (A DTD draft attached.)
  Note that such changes don't touch other parts of XFree becouse it seems
no one application from XFree distributive uses that file.  (Actually there
is at least one which uses, it's a xf86config. But for the first time an 'old
style' *.lst files can be generated automaticaly from *.xml files at
installation time.)  Thus what we need now is keeping this file up to date
only.

  But there are some issues which we still have not agreement for.
  First of all we would like to have descriptions translated to other
languages (as many as possible).  An existent *.lst files scheme implies that
translated descriptions are placed in separate files for each language.
Should we use the same approach for new files or keep all descriptions in
one file?  (A proposed DTD implies the last approach.)
  The next one, althought the variants lists are subsections of layout
elements there are some variants that are repeated in many layouts
('nodeadkeys' or 'phonetic' for example). Would it better to keep descriptions
themself in the global section and use references to them in layout elements
or put similar descriptions into each layout variants subsection?
  And finally, what place is better for the *.xml and *.dtd files?
Now I intend to put them into xkb/rules directory. But maybe someone know
the better place?

  Any comments?
-- 
 Ivan U. Pascal         |   e-mail: pascal at tsu.ru
   Administrator of     |   Tomsk State University
     University Network |       Tomsk, Russia
----


<?xml version="1.0" encoding="koi8-r"?>

<!--

  Description: XKB configuration file DTD
  Author: Sergey V. Udaltsov

-->

<!ELEMENT xkbConfigRegistry (modelList,layoutList,optionList)>

<!ELEMENT modelList (configItem*)>

<!ELEMENT layoutList (layout*)>

<!ELEMENT layout (configItem,variantList?)>

<!ELEMENT optionList (group*)>

<!ELEMENT variantList (configItem*)>

<!ELEMENT group (configItem*,option*)>
<!ATTLIST group
          allowMultipleChoice (true|false) "false">

<!ELEMENT option (configItem*)>

<!ELEMENT configItem (name,description*)>

<!ELEMENT name (#PCDATA)>

<!ELEMENT description (#PCDATA)>
<!ATTLIST description
          lang CDATA #IMPLIED>




More information about the I18ngr mailing list