[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] gentext: difference between uppper and lower case?
Hi Paul,
Over time, the distinction between upper and lower
case key names for gentext elements has gotten muddled. The original
design (from DSSSL days) allowed for both a lower case and an initial cap
version of each text entry, based on the capitalization of the first letter of
the key name. I think the idea was to use the uppercase version in formal
titles and lowercase elsewhere.
But the DSSSL stylesheets themselves never actually
used the lowercase versions. Most gentext lookups are based on the
element name, so to get the uppercase version, it would have to first
change the first letter of the element name used as a key to uppercase to access
the text for a title. At some time before the DSSSL stylesheets were
ported to XSL, the lowercase text strings for English were all converted to
uppercase. From then on, using the "chapter" key would yield "Chapter",
not "chapter". This change dates back to at least 2001.
But not all locales got that treatment, so some
still make the distinction, and even worse, some were half-way converted.
If you look at common/fr.xml, for example, you see inconsistent use of
capitalization in l:gentext elements.
Fortunately, the stylesheets still work for most
locales because they do not use the <l:gentext> elements much. Most
generated text is used in titles and xrefs, and those are handled by the
<l:context> sections of the locale files, not the <l:gentext>
elements. Those context sections have only lowercase key names (to match
the element name) and use the correct capitalization for the generated
text.
If you are only customizing the 'local.l10n'
parameter to alter generated text, you only need to supply the lowercase key
names, because the stylesheet does not make use of the uppercase key names
(unless your customization does).
But if your customization layer uses the template
named "gentext" from common/l10n.xsl to access the l:gentext elements using a
lowercase element name as a key, you may get the lowercase text result in
some locales ("chapter" in fr.xml, for example). If you uppercase the
first letter in the key name, you should always get the uppercase text for all
locales. If you need a lowercase text string, then that is no longer
possible across all locales.
Fixing all the locale files to use uppercase
in both l:gentext text strings is a big job, as no one is familiar with all 74
languages.
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]