[sword-devel] WHNU variants

Troy A. Griffitts scribe at crosswire.org
Sat May 14 14:11:31 MST 2005

	There are 3 options for displaying variants in WHNU: Primary Reading, 
Secondary Reading, and Both.

	The first 2 get done at the filter level in the sword engine.  The user 
selects the option just like any other option (not sure how users select 
sword options in MacSword).  The last one will send both words to you 
and will look funny if they aren't marked up differently.  I'd have to 
know what filter you are using for ThML rendering.  Anyway, here is an 
excerpt of code from the thmlosis filter that catches them when 
converting thml to osis.  You can probably use this same logic and replace:
<seg type="x-variant" subType="x-class:1">word in WH</seg>
<seg type="x-variant" subType="x-class:2">word in NU</seg>

with something like: <u>word in NU</u> (alt: word in WH)
I'm sure you'll come up with something a little more asthetically 
pleasing, as you are the master of all such :)

Here's the code snippet:

                // variants
                if (!strncmp(token, "div type=\"variant\"", 18)) {
                     XMLTag tag = token;
                     text.append("<seg type=\"x-variant\"");
                     SWBuf cls = "x-class:";
                     cls += tag.getAttribute("class");
                     if (cls.length()>8)
                          text.appendFormatted(" subType=\"%s\"", 

                     text += ">";
                     divEnd = "</seg>";
                     newText = true;
                     lastspace = false;
                     handled = true;

Will Thimbleby wrote:
> Hi, can some one point me to some variants in the WHNU module, along  
> with what MacSword should be showing. So I can fix MacSwords variant  code.
> thanks --Will
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list