[sword-devel] JapKougo
DM Smith
dmsmith555 at yahoo.com
Tue Jul 8 11:15:54 MST 2008
Chris Little wrote:
> DM Smith wrote:
>
>> I'm wondering whether it is encoded sufficiently. I see how the module
>> is marked, but it doesn't seem that it maps well to the definition of
>> ruby. I'm not sure of the OSIS semantic that is being used.
>>
>
> For those who haven't looked at the markup, the first ruby annotated
> word in JapKougo is marked thus:
>
> <w gloss="かみ">神</w>
>
> The word in the text is wrapped in a <w/> element. The ruby appears as
> the gloss value. I considered both the xlit attribute and the gloss
> attribute, but ultimately felt that latter was more appropriate to ruby.
>
> I'm not sure what definition of ruby you've seen, but they're basically
> Kana equivalents of Chinese characters used in Japanese text. (It's also
> used in Chinese texts with Bopomofo characters to indicate
> pronunciation.)
The definition of ruby was the w3c definition. You had sent me the link
a while ago when we were discussing interlinear texts.
I provided the link in my email, but here it is again:
http://www.w3.org/TR/ruby
It explains that Japanese ruby was the inspiration but the spec goes
beyond that to general interlinear representations.
The examples I gave were variations of what was given on that page.
> The ruby may represent a simple phonemic transliteration
> of the logographic chracter, but need not necessarily--hence the choice
> of the semantically broad gloss over xlit. Ultimately we should expect
> to see ruby behave similarly to glosses in an interlinear text, and
> gloss is the intended location for word-for-word interlinear glosses.
>
Since I can't read either character set, I was at a loss to how it was
represented. I was concerned that it was letter for letter or phrase for
phrase, and not word for word.
The w3c ruby spec does not use attributes to hold display text. Having
come from that definition to your usage, I didn't expect content in the
attribute.
Now I see how it can map to the w3c ruby spec.
> The fact that ruby appear inline currently is because we have OSIS
> filters that pass along gloss attributes as text rather than with some
> kind of special display markup. I don't even know that the HTML filters
> do this; it may be limited to OSISRTF. When I encoded the Japanese
> texts, I was expecting the gloss attribute to be unhandled and thus
> hidden entirely, but apparently I or someone else did some basic code
> that renders the gloss attribute.
Should SWORD directly render the gloss attribute? Or should it treat it
the same way as it does a lemma or a morph? And would it be a good time
to add xlit also?
Each front-end targets a different HTML renderer, WebKit, XULRunner (aka
FireFox), .... and they have different capabilities regarding CSS and ruby.
If they can handle w3c ruby then I think the markup for each <w> might
be something like:
<ruby><rb>text</rb><rp> (</rp><rt>gloss</rt><rp> --
</rp><rt>lemma</rt><rp> -- </rp><rt>morph</rt><rp>)</rp></ruby>
Or in this case, having only gloss and no lemma or morph:
<ruby><rb>神</rb><rp> (</rp><rt>かみ</rt><rp>)</rp></ruby>
In Him,
DM
More information about the sword-devel
mailing list