]> granicus.if.org Git - docbook-dsssl/commit
Support generation of choice separator in inline simplelist
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 24 May 2005 06:55:18 +0000 (06:55 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 24 May 2005 06:55:18 +0000 (06:55 +0000)
commit04823ab734eba3d9b58daf37c3e5922c27b1fa14
tree6b5b18a452869651aa3bde3ab313872b7c28bd7a
parentf1eee652d32abf3d7c6f97e1f7371aed17adf817
Support generation of choice separator in inline simplelist
(closes #1207532)

This ehancement enables auto-generation of an appropriate
localized "choice separator" (for example, "and" or
"or") before the final item in an inline simplelist.

To indicate that you want a choice separator generated
for a particular list, you need to put a processing
instruction (PI) of the form <?dbchoice choice="foo"?>
as a child a of the list. For example:

  <para>This release adds localiation support for the
  following Indic languages:
    <simplelist type="inline">
      <?dbchoice choice="and" ?>
      <member>Hindi</member>
      <member>Punjabi</member>
      <member>Tamil</member>
      <member>Oriya</member>
      <member>Gujarati</member>
    </simplelist>.
  </para>

Output (for English):

  This release adds localiation support for the
  following Indic languages: Hindi, Punjabi, Tamil,
  Oriya, and Gujarati.

Or if the logical relationship between the items in the
list is an "or" relationship, then use choice="or":

  <para>Choose from ONE and ONLY ONE of the following:
    <simplelist type="inline">
      <?dbchoice choice="or" ?>
      <member>A</member>
      <member>B</member>
      <member>C</member>.
    </simplelist>
  </para>

Output (for English):

  Choose from ONE and only ONE of the
  following choices: A, B, or C.

As a temporary workaround for the fact that most of the
DocBook non-English locale files don't have a
localization for the word "or", you can put in a
literal string to be used; example for French:

  <para>Choose from ONE and ONLY ONE of the following:
    <simplelist type="inline">
      <?dbchoice choice="ou" ?>
      <member>A</member>
      <member>B</member>
      <member>C</member>.
    </simplelist>
  </para>

That is, use "ou" instead of "or".
xsl/common/common.xsl
xsl/fo/lists.xsl
xsl/html/lists.xsl
xsl/manpages/lists.xsl