Michael Smith [Tue, 7 Jun 2005 07:38:07 +0000 (07:38 +0000)]
Original changelog from the docbook/contrib/xsl/db2man days.
Adding so that we at least have access to a record of the change
descriptions here (if not the whole CVS history).
Michael Smith [Tue, 7 Jun 2005 06:21:59 +0000 (06:21 +0000)]
Removed unnecessary trailing comma after final term/glossterm
(closes #1215890; thanks to Sam Steingold for reporting the
problem).
::PROBLEM::
If a varlistentry or glossentry contains multiple term or
glossterm elements, a comma is rendered after the final term or
glossterm. A comma should instead be rendered only after every
term or glossterm _except_ the last.
::FIX::
Reworked template logic for term/glossterm. They are now handled
with an xsl:for-each in the varlistentry/glossentry template,
rather than as separate templates.
HTML and FO stylesheets appear to have the same problem, so we
probably need to port this change to those as well.
Michael Smith [Mon, 6 Jun 2005 09:39:41 +0000 (09:39 +0000)]
Uppercase titles in x-ref to Refentry children (closes #1215547;
thanks to Jens Granseuer for reporting the problem).
::PROBLEM::
Titles of all first-level sections in man pages are always
rendered in uppercase. But cross-references to those titles are
not uppercase.
::FIX::
Cross-references to titles of all first-level sections of Refentry
output are now rendered in uppercase; that is, titles in x-refs to
Refnamediv, Refsynopsisdiv, Refsect1, and any Refsection that is a
direct child of Refentry.
Also, x-ref to Refnamediv now uses the localized "NAME" title
instead of the using the first Refname child. This makes the
output inconsistent with HTML and FO output, but for man-page
output, it seems to make better sense to have the "NAME". (It may
actually make better sense to do it that way in HTML and FO output
as well.) That said, I guess it's not likely that most people
would put in an x-ref to a Refnamediv section, so maybe it's kind
of a moot point...
Bob Stayton [Fri, 3 Jun 2005 17:22:31 +0000 (17:22 +0000)]
Fixed bug [ 1212159 ] Missing navigational links with XHTML chunking
which was caused by the following:
1. When chunk.hierarchy is created, it is a collection of
div elements in a variable, and then that is converted to a
node-set by exlt.
2. In HTML, there is no namespace, so the div elements are in
no namespace and they work.
3. In XHTML, the div elements are in the xhtml namespace because
it is the default namespace. So they cannot be addressed as
just "div", they must have a namespace prefix.
4. I added an explicit chunkfast namespace to avoid conflict
with the default namespace.
Michael Smith [Thu, 2 Jun 2005 06:58:00 +0000 (06:58 +0000)]
Added support for processing funcparams (closes #1213166; thanks
to Barry Rountree for reporting).
::PROBLEM::
The funcparams element was not being processed as expected.
::CAUSE::
No logic existed in manpages stylesheets for handling funcparams.
::FIX::
Fixed by taking old code for handling of funcprototype and
children, and replacing it with code ported over from HTML
templates for ANSI-style output.
::AFFECTS::
This change affects handling of all funcprototype output. Along
with adding support for funcparams, the following changes were
also made:
- removed the space that was being output between funcdef and
paramdef; example:
was: float rand (void);
now: float rand(void);
- turned off bold formatting for the <type> element when it
occurs within a funcdef or paramdef
- moved space -> nobreak-space replacement logic into a separate
template (for potential re-use elsewhere if we need it)
::TODO::
We need to add an option for K&R style funcprototypes.
See #1213277.
Michael Smith [Wed, 1 Jun 2005 17:10:03 +0000 (17:10 +0000)]
Applied patch from David Green for #1211477, to prevent
StackOverflowError encountered when processing tables with ~700
rows with Xalan. Smoke-tested and didn't see any obvious problems
with the fix, so going ahead and committing it so others can test
with snapshot.
Michael Smith [Wed, 1 Jun 2005 11:41:48 +0000 (11:41 +0000)]
Align refnamediv title correctly when refentry.generate.title
is non-zero (closes #1212641).
::Problem:
When refentry.generate.title is non-zero, the title output for
Refnamediv is not aligned flush left.
::Cause:
No code for setting start-indent="" was included in
refentry.title.properties. It should be in order to make the
Refnamediv title output be flush left, as are titles for all other
sectioning children of Refentry
::Fix:
Added code for setting start-indent="" in
refentry.title.properties.
Michael Smith [Wed, 1 Jun 2005 10:45:30 +0000 (10:45 +0000)]
Generate XEP bookmarks for Refentry children. (closes #1212491)
Titled child sections of Refentry (Refsynosisdiv, Refsection, and
Refsect1 to Refsect3) were not included in the match statement
used for generating XEP bookmarks. Don't know whether that was
intentional for some reason or whether it was just an oversight.
But given that both AXF and Passivetex bookmarks are generated for
those same Refentry children, it seems like XEP ones ought to also
be generated, for the sake of consistency if for no other reason.
Michael Smith [Wed, 1 Jun 2005 10:25:17 +0000 (10:25 +0000)]
Corrected formatting of generated "Name" title in refentry output
(closes #1212396; thanks to Andreas Lalloo for reporting the
problem).
:Problem::
The "Name" title generated for FO output of Refnamediv in Refentry
is not aligned flush left, as all the other subheadings of
Refentry are, and as the generated Name subheading for Refentry is
in HTML output. Also, the Name title is in a larger font size than
the titles of the other first-level children of Refentry.
:Fix::
The "Name" title generated for FO output of Refnamediv in Refentry
is now handled using the same formatting as that used for all
other first-level children of Refentry.
::Affects:
Along with affecting processing for generated titles for
Refnamediv in FO output, it is possible that this change may have
unanticipated side effects on processing of titles for
Refsynopsisdiv, Refsection, and Refsect1 to Refsect3. The reason
is that part of this change takes the template contents formerly
used only for processing Refsynopsisdiv, Refsection, and Refsect1
to Refsect3, and "repurposes" those template contents for use in
processing the generated title for Refnamediv.
Michael Smith [Mon, 30 May 2005 10:59:42 +0000 (10:59 +0000)]
Re-worked construction of .TH title line (closes #1210488).
Also, made comment generated at top of page include version info
(closes #1211254).
Here are the details about the refinements made to the
construction of the .TH title line:
- "extra1" (which shows up in the center footer of each page):
If a date cannot be found in the source, we now automatically
generate a localized "long format" date
- "extra2" (which shows up in the left footer):
We now first search for "product version" info; then, if we
can't find that, a "product name"; if we can't find that, we
look for "other" info to use. And we can't find that, we leave
it empty. The exact sequence of elements checked is this:
1. productnumber in info or refentryinfo
2. productnumber in info or referenceinfo of parent reference
3. any refmeta/refmiscinfo that has class = 'version'
4. productname in info or refentryinfo
5. productname in info or referenceinfo of parent reference
6. refmeta/refmiscinfo (first one)
7. refnamediv/refclass (first one)
- "extra3" (which shows up in the center header):
The exact sequence of elements checked is now this:
1. title in info or referenceinfo of parent reference
2. refnamediv/refclass (first one)
3. refmeta/refmiscinfo (first one)
Michael Smith [Sun, 29 May 2005 09:00:28 +0000 (09:00 +0000)]
Standalone stylesheet for stripping namespaces from DocBook 5/NG
docs. You currently need to do two-pass processing to use this:
First, transform your DocBook 5/NG source doc using this, then
transform the result as usual with the manpages/docbook.xsl
stylesheet. Of course you can always run the process using a pipe
if you want. Example:
It may be that there is actually some way to set it up as a
single-pass XSLT process, as is done with the HTML stylesheets.
But I've not yet figured out how to get that to work...
Jirka Kosek [Sat, 28 May 2005 11:54:15 +0000 (11:54 +0000)]
Previous change (adding text-align="left") caused article titles to be displayed left aligned instead centered. This was backward incompatible change in presentation. Now attribute set is conditional and outputs text-align="center" for titles of standalone articles.
Probably in the future more general fix should be done -- either creating separate article.title.properties, or refactoring FO properties settings between titlepage templates and attribute sets.
Michael Smith [Sat, 28 May 2005 02:55:59 +0000 (02:55 +0000)]
Portability tweaks for the build.
- pull in cvstools/Makefile.incl, mainly so that we can use
cvstools/runtrang
- "trang" -> $(RUNTRANG) so that cvstools/runtrang is used; if
users don't have trang binary installed, that will find
trang.jar and run it. Also allows users to manually specify
what trang they want (e.g., "make RUNTRANG=trang")
- "clean" target now also removes dbforms* files
- "clean" target now also does "make -C build clean"
Michael Smith [Thu, 26 May 2005 23:29:25 +0000 (23:29 +0000)]
Make language codes RFC compliant (closes #1208931; thanks to
Bernd Groh for reporting).
::PROBLEM:
Stylesheets output two-part language codes in the form "zh_CN".
But underscores in language codes are actually neither RFC
compliant nor compliant with the HTML 4.0 rec. The separator
should be a hyphen. To quote the specs:
Section 8.1.1, "Language Codes"[1], in the HTML 4.0 Rec.
states that:
[RFC1766] defines and explains the language codes that MUST be
used in HTML documents.
Briefly, language codes consist of a primary code and a
possibly empty series of subcodes:
language-code = primary-code ( "-" subcode )*
And in RFC 1766, "Tags for the Identification of
Languages"[2], the EBNF for "language tag" is given as:
::CAUSE:
Stylesheets simply pass through language codes unaltered. So if
users put "zh_CN" in their source, they will get "zh_CN" in
their HTML output.
::FIX:
Added a new boolean config parameter, "l10n.lang.value.rfc.compliant",
set to 1 by default. If it is non-zero, any underscore in a
language code will be converted to a hyphen in HTML output. If
it is zero, the language code will be left as-is.
::AFFECTS:
This change affects any HTML output that contains two-part
language codes.
Bob Stayton [Wed, 25 May 2005 22:35:19 +0000 (22:35 +0000)]
Set start-indent and end-indent for fo:table-body used to format lists to
zero so that they do not inherit any start-indent from their container, which
would indent relative to the cell boundary.
Michael Smith [Tue, 24 May 2005 22:40:41 +0000 (22:40 +0000)]
Make xrefs and olinks work, and prevent instances of “ and
” entities in output (closes #741578 and #956072; thanks to
Jens Granseuer and Sam Steingold for reporting the problems)
::Problem:
If you include an xref in a source document, instead of getting
the xref text you would expect in the output, you just get
"[xref to refsect1]", where "refsect" is the name of the target
element for the xref. If you include an olink, it works as
expected -- except that the output text has “ and ”
entities (double "curly" quotation marks).
::Cause:
The manpages/docbook.xsl driver imports the html/docbook.xsl
stylesheet, which in turn imports the html/xref.xsl file.
The manpages/docbook.xsl file then imports the manpages/xref.xsl
file. That file contains a "xref" template that overrides the
the one in html/xref.xsl and that, by design, does nothing
except to generate the "[xref to refsect1]" text instead of the
expected xref output.
On the other hand, the manpages stylesheets don't override the
"olink" template; therefore, the "olink" template from the
html/xref.xsl file is used "as is". And being that it is
intended for HTML output, that template uses the “ and
” to wrap titles in xref output.
::Fix:
The original manpages/xref.xsl file has now been removed. The
build for the manpages distribution now makes that file, using
the textify.xsl stylesheet to automatically generate it from the
html/xref.xsl file. It is built in such a away that it basically
just contains special copies of the "xref" and "olink" templates
that cause “ and ” instances to be transformed into
"\(lq" and "\(rq" (groff "left quote" and "right quote").
It might seem odd that templates from the html/xref.xsl are
used, since those templates a designed to generate hyperlinks of
the form <a href="#foo">the section called "Bar"</a>. But it
works because the manpages stylesheets end up using the text
value of the output of the above. Thus, the <a href="#foo"> and
</a> parts are stripped out, leaving just the text between
('the section called "Bar"').
::Affects
Only affects output of xref and olink elements. The fix may not
be complete and/or may cause other problems. Please test.
In particular, while it may fix the “ and ” problem
that English lang/locales users have run into, it doesn't fix
the corresponding problem for output of xrefs and olinks in many
non-English locales, which use quoting characters other than
“ and ”
To give just one example of many: in Japanese, the quoting
characters are 「 and 」 ("left corner bracket" and
"right corner bracket"). It is possible to "fix" the problem for
all locales; but it is just a question of whether there is
enough of a demand for it that it is worth doing.
Michael Smith [Tue, 24 May 2005 09:40:55 +0000 (09:40 +0000)]
Prevent "sticky" fonts changes. (closes #956070; thanks to Sam
Steingold for reporting the problem, and for his patience...)
::Problem:
Sometimes a bold or italic font change inadvertently ends up
becoming "sticky" such that a following chunk of text that
should just be rendered as plain text instead gets
boldfaced/italicized.
::Cause:
Font changes were simply being nested, as they are in HTML.
While that works for HTML, it doesn't work for roff, where
font-change instructions aren't actually intended to nest.
::Fix:
Attempted to un-nest bold/italic font changes. When the manpages
stylesheets encounter node sets that need to be boldfaced or
italicized, they now put the \fBfoo\fR \fIbar\fR groff
bold/italic instructions separately around each node in the set.
This may not be a complete fix for the problem. In fact, it may
cause other problems. Please test :^)
Michael Smith [Tue, 24 May 2005 06:55:18 +0000 (06:55 +0000)]
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>
Michael Smith [Mon, 23 May 2005 13:59:11 +0000 (13:59 +0000)]
Rolled back some over-aggressive line-break cleanup, and removed
space-normalizing call in group|arg template because it causes
<sbr/> to be handled incorrectly.
Michael Smith [Mon, 23 May 2005 12:05:30 +0000 (12:05 +0000)]
Make handling of date format strings more robust (closes #1206837).
::Problem:
If the "dbtimestamp" PI has words in it that contain any of the
single-letter characters used as date/time formatting
instructions, the output is not what would be expected.
For example, Spanish "long" dates look like this:
23 de mayo de 2005
So you would expect that you could generate a date of that form
using the dbtimestamp PI with a format string like the following:
<?dbtimestamp format="d de B de Y"?>
But if you try that, you get the following output:
23 23e mayo 23e 2005
That is, the "d" in "de" is replaced with the day of the month.
::Cause::
The format-string parsing logic works by walking through the
format string character-by-character. So when it gets to the "d"
in "de", it has no way of discerning that it is not the "d"
formatting instruction but is instead part of a word intended to
be included in the output as a literal string.
::Fix::
The format-string parsing logic now splits format strings into
tokens and delimiters and evaluates them token-by-token instead
of character-by-character.
For example, it splits the Spanish "long" date format like this:
Thus, in looking for the "d" formatting instruction, the "d"
token matches but the "de" token does not.
As delimiters, it recognizes the following characters:
<space> <tab> <CR> <LF> , . / - ( ) [ ]
::Affects:
This change affects output of the "dbtimestamp" PI as well as
output from any customization layers that call the
"datetime.format" template. It affect all formats (HTML, FO, etc.).
Michael Smith [Sun, 22 May 2005 12:25:26 +0000 (12:25 +0000)]
Grand Unification: Epilogue (2): If "neighboring" text nodes in
mixed content are whitespace-only, apply the special sauce just
before serving; that is, at the end, not both at the beginning and
at the end.
Michael Smith [Sun, 22 May 2005 01:38:03 +0000 (01:38 +0000)]
Repaired line-breaking in list output. Thanks to Hendrik Sattler
for reporting the problem.
The cause of this is was a change that was made a while back to
reduce excessive blank lines in output. Looks like in this case it
cut it back a bit too aggressively. There may yet be some other
cases that will need more fine-tuning.
Michael Smith [Sat, 21 May 2005 11:17:23 +0000 (11:17 +0000)]
Whitespace Grand Unification: Epilogue (1): If "neighboring" text
nodes in mixed content are whitespace-only, leave them unseasoned;
that is, don't add the special sauce.
Michael Smith [Fri, 20 May 2005 09:08:59 +0000 (09:08 +0000)]
Verbatim environment "Grand Unification" fix.
Attempte to fix handling of verbatim environments (literallayout,
programlisting, screen) and, in a related way, text nodes.
Particularly in mixed-content blocks. I think I got it working...
Michael Smith [Fri, 13 May 2005 02:38:01 +0000 (02:38 +0000)]
Added/Corrected HTML Help language codes. Note that there are no
HTML Help language codes for Bangla, Gujarati, Punjabi, or Tamil.
So, set the code for those to the code for Hindi, which, it seems,
is the closest we can get.
Michael Smith [Wed, 11 May 2005 14:48:13 +0000 (14:48 +0000)]
Simplified and corrected rendering of simplelist. (closes #1154750
and #699081; thanks to Matthias Andree and Bert Vermeulen for
reporting the problem)
- Any simplelist type="inline" instance is now rendered as a
comma-separated list, with a comma and also a localized "and"
before the last item.
- Any simplelist instance whose type is not inline is rendered
as a one-column vertical list (ignoring the values of the type
and columns attributes if present)