[sword-devel] overline
Chris Little
chrislit at crosswire.org
Wed Sep 11 06:26:21 MST 2013
Troy,
In r2973, you added some handling for <hi rend="ol">...</hi> in OSIS
documents being converted to plaintext that I would like to see
disappear quickly and forever on account of being all kinds of bad.
First, this is not valid OSIS. rend is not an attribute on any OSIS
element. Switching rend to type at least brings it closer to OSIS validity.
But "ol" is still not a valid type for hi, and doesn't conform to the
standards for naming character styles in OSIS (or TEI). In both OSIS and
TEI, the corresponding CSS property value is used, so it should be
"overline" in either case. I see there's apparently a bug in OSIS and
overline was left out of the hi types, so you'd need to use "x-overline"
for OSIS (or "overline" for a corresponding TEI document).
More generally, the implementation of overline markup to plaintext
handling has some undesirable features. Using the filter inserts
characters into the character string to simulate a textual style with
actual additional characters. I can't imagine the use case in which
interleaving real character data with presentation-simulating characters
is the right course of action. We don't do any sort of
presentation-simulation for other hi types, but the nearest thing I can
imagine to appropriate plaintext presentation would be something like
markdown, e.g. *bold*, /italic/, _underline_, ¯overline¯.
\uXXXX escapes are only supported by C++11. Using this needlessly cuts
off support for older compilers, which are likely to still be in use on
plenty of aging platforms.
I see now that the OSIS to (X)HTML filters got support for <hi
rend="ol"> back in 2011, and I would likewise strenuously advocate the
removal of that in favor of support for markup that is at least valid
OSIS (<hi type="x-overline">).
--Chris
More information about the sword-devel
mailing list