<xsl:variable name="man.charmap.contents">
<xsl:if test="$man.charmap.enabled != 0">
+ <xsl:variable name="lang">
+ <xsl:call-template name="l10n.language">
+ <xsl:with-param name="target" select="//refentry[1]"/>
+ </xsl:call-template>
+ </xsl:variable>
<xsl:call-template name="read-character-map">
<xsl:with-param name="use.subset" select="$man.charmap.use.subset"/>
- <xsl:with-param name="subset.profile" select="$man.charmap.subset.profile"/>
+ <xsl:with-param name="subset.profile">
+ <xsl:choose>
+ <xsl:when test="$lang = 'en'">
+ <xsl:value-of select="$man.charmap.subset.profile.english"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$man.charmap.subset.profile"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
<xsl:with-param name="uri">
<xsl:choose>
<xsl:when test="$man.charmap.uri != ''">
<!ENTITY man.break.after.slash SYSTEM "../params/man.break.after.slash.xml">
<!ENTITY man.charmap.enabled SYSTEM "../params/man.charmap.enabled.xml">
<!ENTITY man.charmap.subset.profile SYSTEM "../params/man.charmap.subset.profile.xml">
+<!ENTITY man.charmap.subset.profile.english SYSTEM "../params/man.charmap.subset.profile.english.xml">
<!ENTITY man.charmap.uri SYSTEM "../params/man.charmap.uri.xml">
<!ENTITY man.charmap.use.subset SYSTEM "../params/man.charmap.use.subset.xml">
<!ENTITY man.copyright.section.enabled SYSTEM "../params/man.copyright.section.enabled.xml">
&man.charmap.uri;
&man.charmap.use.subset;
&man.charmap.subset.profile;
+&man.charmap.subset.profile.english;
&man.string.subst.map.local.pre;
&man.string.subst.map;
&man.string.subst.map.local.post;
<src:fragref linkend="man.break.after.slash.frag"/>
<src:fragref linkend="man.charmap.enabled.frag"/>
<src:fragref linkend="man.charmap.subset.profile.frag"/>
+<src:fragref linkend="man.charmap.subset.profile.english.frag"/>
<src:fragref linkend="man.charmap.uri.frag"/>
<src:fragref linkend="man.charmap.use.subset.frag"/>
<src:fragref linkend="man.copyright.section.enabled.frag"/>
character map to use in place of the standard roff character map
provided in the distribution.</para>
-<para>You can also use a subset of a character map. For details, see
-the <parameter>man.charmap.use.subset</parameter> and
-<parameter>man.charmap.subset.profile</parameter> parameters.</para>
+<para>You can also use a subset of a character map. For details,
+see the <parameter>man.charmap.use.subset</parameter>,
+<parameter>man.charmap.subset.profile</parameter>
+<parameter>man.charmap.subset.profile.english</parameter>
+parameters.</para>
</refsection>
</refsection>
--- /dev/null
+<refentry xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="5.0" xml:id="man.charmap.subset.profile.english">
+<refmeta>
+<refentrytitle>man.charmap.subset.profile.english</refentrytitle>
+<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>man.charmap.subset.profile.english</refname>
+<refpurpose>Profile of character map subset</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment xml:id="man.charmap.subset.profile.english.frag">
+<xsl:param name="man.charmap.subset.profile.english">
+@*[local-name() = 'block'] = 'Miscellaneous Technical' or
+(@*[local-name() = 'block'] = 'C1 Controls And Latin-1 Supplement (Latin-1 Supplement)' and
+ @*[local-name() = 'class'] = 'symbols')
+or
+(@*[local-name() = 'block'] = 'General Punctuation' and
+ (@*[local-name() = 'class'] = 'spaces' or
+ @*[local-name() = 'class'] = 'dashes' or
+ @*[local-name() = 'class'] = 'quotes' or
+ @*[local-name() = 'class'] = 'bullets'
+ )
+) or
+@*[local-name() = 'name'] = 'HORIZONTAL ELLIPSIS' or
+@*[local-name() = 'name'] = 'WORD JOINER' or
+@*[local-name() = 'name'] = 'SERVICE MARK' or
+@*[local-name() = 'name'] = 'TRADE MARK SIGN' or
+@*[local-name() = 'name'] = 'ZERO WIDTH NO-BREAK SPACE'
+</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsection><info><title>Description</title></info>
+
+<para>If the value of the
+ <parameter>man.charmap.use.subset</parameter> parameter is
+ non-zero, and your DocBook source is written in English (that
+ is, if its <tag class="attribute">lang</tag> or <tag
+ class="attribute">xml:lang</tag> attribute has the value
+ <literal>en</literal> or if it has no <tag
+ class="attribute">lang</tag> or <tag
+ class="attribute">xml:lang</tag>), then the character-map
+ subset specified by the
+ <parameter>man.charmap.subset.profile.english</parameter>
+ parameter is used instead of the full roff character map.</para>
+
+<para>Otherwise, if the <tag class="attribute">lang</tag> or <tag
+ class="attribute">xml:lang</tag> attribute
+ on the root element in your DocBook source or on the first
+ <tag>refentry</tag> element in your source has a value other
+ than <literal>en</literal>, then the character-map subset
+ specified by the
+ <parameter>man.charmap.subset.profile</parameter> parameter is
+ used instead of
+ <parameter>man.charmap.subset.profile.english</parameter>.</para>
+
+<para>The difference between the two subsets is that
+ <parameter>man.charmap.subset.profile</parameter> provides
+ mappings for characters in Western European languages that are
+ not part of the Roman (English) alphabet (ASCII character set).</para>
+
+<para>The value of <parameter>man.charmap.subset.profile.english</parameter>
+is a string representing an XPath expression that matches attribute
+names and values for <tag
+ namespace="http://docbook.sf.net/xmlns/unichar/1.0"
+ >output-character</tag> elements in the character map.</para>
+
+<para>For other details, see the documentation for the
+<parameter>man.charmap.subset.profile.english</parameter> and
+<parameter>man.charmap.use.subset</parameter> parameters.</para>
+
+</refsection>
+</refentry>
<para>If the value of the
<parameter>man.charmap.use.subset</parameter> parameter is non-zero,
-The character-map subset specified by the
-<parameter>man.charmap.subset.profile</parameter> parameter is used
-instead of the full roff character map.</para>
+and your DocBook source is not written in English (that
+ is, if its <tag class="attribute">lang</tag> or <tag
+ class="attribute">xml:lang</tag> attribute has a value other
+ than <literal>en</literal>), then the character-map subset
+ specified by the
+ <parameter>man.charmap.subset.profile</parameter> parameter is
+ used instead of the full roff character map.</para>
+
+<para>Otherwise, if the <tag class="attribute">lang</tag> or <tag
+ class="attribute">xml:lang</tag> attribute on the root
+ element in your DocBook
+ source or on the first <tag>refentry</tag> element in your source
+ has the value <literal>en</literal> or if it has no <tag
+ class="attribute">lang</tag> or <tag
+ class="attribute">xml:lang</tag>, then the character-map
+ subset specified by the
+ <parameter>man.charmap.subset.profile.english</parameter>
+ parameter is used instead of
+ <parameter>man.charmap.subset.profile.english</parameter>.</para>
+
+<para>The difference between the two subsets is that
+ <parameter>man.charmap.subset.profile</parameter> provides
+ mappings for characters in Western European languages that are
+ not part of the Roman (English) alphabet (ASCII character set).</para>
<para>The value of <parameter>man.charmap.subset.profile</parameter>
-is a string representating an XPath expression that matches attribute
-names and values for <tag namespace="http://docbook.sf.net/xmlns/unichar/1.0">output-character</tag> elements in the character map.</para>
+is a string representing an XPath expression that matches attribute
+names and values for <tag
+ namespace="http://docbook.sf.net/xmlns/unichar/1.0">output-character</tag>
+elements in the character map.</para>
<para>The attributes supported in the <link xlink:href="http://docbook.sourceforge.net/snapshot/xsl/manpages/charmap.groff.xsl">standard roff character map included in the distribution</link> are:
<variablelist>
<varlistentry>
<term>string</term>
<listitem>
- <simpara>a string representating an roff/groff escape-code (with
+ <simpara>a string representing an roff/groff escape-code (with
"@esc@" used in place of the backslash), or a simple ASCII
string; all characters in the roff character map have this
attribute</simpara>
<note>
<para>Depending on which XSLT engine you use, either the EXSLT
<function>dyn:evaluate</function> extension function (for xsltproc or
-Xalan) or <function>saxon:evaluate</function> extensio function (for
+Xalan) or <function>saxon:evaluate</function> extension function (for
Saxon) are used to dynamically evaluate the value of
<parameter>man.charmap.subset.profile</parameter> at run-time. If you
don't use xsltproc, Saxon, Xalan -- or some other XSLT engine that
<para>If the value of the
<parameter>man.charmap.use.subset</parameter> parameter is non-zero,
a subset of the roff character map is used instead of the full roff
-character map. The profile of the subset used is specified by the
-<parameter>man.charmap.subset.profile</parameter> parameter.</para>
+character map. The profile of the subset used is determined either
+by the value of the
+<parameter>man.charmap.subset.profile</parameter>
+parameter (if the source is not in English) or the
+<parameter>man.charmap.subset.profile</parameter> parameter (if
+the source is in English).</para>
<note>
<para>You may want to experiment with setting a non-zero value of
never necessary to use it in full -- the DocBook XSL Stylesheets
support a mechanism for using, within any given character map, a
subset of character mappings instead of the full set. You can use the
-<parameter>man.charmap.subset.profile</parameter> parameter to tune
-the profile of that subset to use.</para>
+<parameter>man.charmap.subset.profile</parameter> or
+<parameter>man.charmap.subset.profile.english</parameter>
+parameter to tune the profile of that subset to use.</para>
</refsection>
</refsection>