<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I added support to JSword (actually the xslt that lives w/in bibledesktop’s SVN) and BibleDesktop (toggle). So no changes w/in JSword’s git repository.<div class=""><br class=""></div><div class="">This solution doesn’t allow for strong’s numbers, morphology, lemmas to be specified in the same w element as the one having gloss.</div><div class=""><br class=""></div><div class="">This builds the same xhtml as SWORD, which Peter supplied below. A browser that is capable of properly showing ruby will not show it inline w/ (…). BibleDesktop isn’t capable. STEP is. AndBible may be.</div><div class=""><br class=""></div><div class="">I recommend not adding it unless you also add a toggle for it. The following shows it by default.<br class=""><div class=""><br class=""></div><div class="">See <a href="http://www.crosswire.org/svn/jsword/bibledesktop/src/main/resources/xsl/cswing/simple.xsl" class="">http://www.crosswire.org/svn/jsword/bibledesktop/src/main/resources/xsl/cswing/simple.xsl</a></div><div class=""><br class=""></div><div class="">Here are the pertinent changes.</div><div class="">The change was to add a parameter that can be changed when calling xslt:</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <!-- Whether to show glosses as ruby text. --></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <xsl:param name="Gloss" select="'true'"/></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class="">And then add support for w[@gloss] before <xsl:template match="w"></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><div style="margin: 0px; line-height: normal;" class=""> <xsl:template match="w[@gloss]"></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""><xsl:choose></span></div><div style="margin: 0px; line-height: normal;" class=""> <xsl:when test="$Gloss = 'true'"></div><div style="margin: 0px; line-height: normal;" class=""> <ruby><span style="text-decoration: underline" class=""><rb></span><xsl:apply-templates/><span style="text-decoration: underline" class=""></rb><rp></span>(<span style="text-decoration: underline" class=""></rp><rt></span><xsl:value-of select="@gloss"/><span style="text-decoration: underline" class=""></rt><rp></span>)<span style="text-decoration: underline" class=""></rp></span></ruby></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:when></span></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""><xsl:otherwise></span></div><div style="margin: 0px; line-height: normal;" class=""> <xsl:apply-templates/></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:otherwise></span></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:choose></span></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:template></span></div><p style="margin: 0px; line-height: normal; min-height: 15px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; line-height: normal;" class=""> <xsl:template match="w[@gloss]" mode="jesus"></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""><xsl:choose></span></div><div style="margin: 0px; line-height: normal;" class=""> <xsl:when test="$Gloss = 'true'"></div><div style="margin: 0px; line-height: normal;" class=""> <ruby><span style="text-decoration: underline" class=""><rb></span><xsl:apply-templates mode="jesus"/><span style="text-decoration: underline" class=""></rb><rp></span>(<span style="text-decoration: underline" class=""></rp><rt></span><xsl:value-of select="@gloss"/><span style="text-decoration: underline" class=""></rt><rp></span>)<span style="text-decoration: underline" class=""></rp></span></ruby></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:when></span></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""><xsl:otherwise></span></div><div style="margin: 0px; line-height: normal;" class=""> <xsl:apply-templates mode="jesus"/></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:otherwise></span></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:choose></span></div><div style="margin: 0px; line-height: normal;" class=""> <span style="text-decoration: underline" class=""></xsl:template></span></div><div class=""><span style="text-decoration: underline" class=""><br class=""></span></div></div><div><blockquote type="cite" class=""><div class="">On Aug 20, 2017, at 5:16 PM, Peter von Kaehne <<a href="mailto:refdoc@gmx.net" class="">refdoc@gmx.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Sun, 2017-08-20 at 13:01 -0400, DM Smith wrote:<br class=""><blockquote type="cite" class="">My response on JSword-devel mailing list:<br class="">JSword has no support for ruby markup. I haven’t looked at it for<br class="">years, but from what I remember, it was experimental, using OSIS in a<br class="">non-standard way.<br class=""></blockquote><br class="">As you have found out by now, acc subsequent posts, the OSIS is<br class="">completely standard using a "gloss" attribute. The only experimental<br class="">part was the (x)html rendering using the ruby tag which for a long time<br class="">remained unsupported in rendering engines and remains apparently<br class="">difficult in Bibledesktops' enginge. As such the ruby tag and its<br class="">subordinate tags are part of xhtml, but most browsers were slow in<br class="">picking up on it. <br class=""><br class="">This is the code from osisxhtml.cpp doing the transformation:<br class=""><br class=""> if ((attrib = tag.getAttribute("gloss"))) {<br class=""> // I'm sure this is not the<br class="">cleanest way to do it, but it gets the job done<br class=""> // for rendering ruby chars<br class="">properly ^_^<br class=""> buf -= lastText.length();<br class=""><br class=""> outText("<ruby><rb>", buf, u);<br class=""> outText(lastText, buf, u);<br class=""> outText("</rb><rp>(</rp><rt>",<br class="">buf, u);<br class=""> val = strchr(attrib, ':');<br class=""> val = (val) ? (val + 1) :<br class="">attrib;<br class=""> outText(val, buf, u);<br class=""> outText("</rt><rp>)</rp></ruby><br class="">", buf, u);<br class=""><br class="">Wrt desirability - the background is the odd nature of Japanese (and to<br class=""> some extent Korean) writing systems:<br class=""><br class="">Japanese uses two syllabic scripts, Hiragana and Katagana which each in<br class="">principle can express the full gammut of the languages, but for<br class="">historical etc reasons every so often Chinese ideographs get thrown in<br class="">(Kanji script, essentially traditional, not simplified Chinese). These<br class="">characters express a complete word and have a Japanese pronounciation -<br class="">but you would need to know the pronounciation and meaning by heart as<br class="">there is nothing in the character which gives it away. So for the less<br class="">educated the Kanji script sign thrown into the stream of syllabics are<br class="">insurmountable obstacles. A well educated Japanese will have no<br class="">difficulty reading a text, even with many Kanji signs, but some less<br class="">might stumble and stall. So for that purpose many educational texts and<br class="">certainly Bibles are using glosses in syllabics to overcome that<br class="">difficulty. <br class=""><br class="">So, in summary, our Japanese modules are currently absolutely fine and<br class="">perfectly well useful for anyone with high school or better education,<br class="">but will fail to reach less educated people. I would consider this a<br class="">bug and would like to see it resolved. <br class=""><br class="">I would think the best solution in the interim is to make it toggled in<br class="">the engine and if it is impossible to display on a particular engine<br class="">keep it switched off and do not expose the functionality to users. If<br class="">it renders fine everywhere then we need a new debate. <br class=""><br class="">As such of course the OSIS and increasingly the related XHTML is<br class="">absolutely standard (and not even specific to Japanese) and could also<br class="">be used just fine for e.g. interlinear texts or other more complicated<br class="">display functionality<br class=""><br class="">Peter<br class="">_______________________________________________<br class="">jsword-devel mailing list<br class=""><a href="mailto:jsword-devel@crosswire.org" class="">jsword-devel@crosswire.org</a><br class="">http://www.crosswire.org/mailman/listinfo/jsword-devel<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>