[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Refactoring opportunities for xsl-fo files
From: |
Evgeniy Tarassov |
Subject: |
Re: [lmi] Refactoring opportunities for xsl-fo files |
Date: |
Tue, 22 May 2007 16:59:41 +0200 |
On 5/22/07, Greg Chicares <address@hidden> wrote:
The xsl-fo files seem to duplicate a lot of stuff. Would it be a
good idea to move the common parts into one file that they could
all share? For example, this routine:
I agree with you 100% -- the current XSL-FO files share huge amount of
the same code. These files would look much prettier if we refactor
them -- not only the by extracting the common parts, but also by
rewriting using the right tricks to achieve the same formatting (a
good example would be to replace the construct
<fo:leader />, which currently serves only to insert some
padding, by padding property itself, which IMHO makes the code more
readable and cleaner).
[...] And here's a variable that
seems to differ only in that one variant includes a blank character
while another does not:
<xsl:variable
name="allletters">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 </xsl:variable>
<xsl:variable name="allletters">
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 </xsl:variable>
though I'm not sure whether there's a reason for any difference.
I think this extra space is a minor bug or a leftover from some code
cleaning, that was done oneday. This variable is used to translate
table headers title so that spaces in a title become hard-spaces
(non-breaking spaces). More: this construct is obsolete -- I think it
was already discussed (long time ago) on lmi mailing list how to
achieve the same effect without replacing spaces by underscores ('_')
or by hard-spaces (  which is almost equivalent to ).
--
Best wishes,
Evgeniy Tarassov