[sword-devel] CSS Again... (was Re: Rendering added words for languages that don't use italics?)

Troy A. Griffitts scribe at crosswire.org
Tue Apr 19 09:13:38 MST 2011

Again, to be rude and top-post, not having a specific line in the
message to which I wish to comment...

I don't believe anyone is against HTML rendering frontends supplying
stylesheets to their output.

I believe Bibletime does this for their user selectable themes.

I have often lamented the fact that we have at least 3 HTML rendering
filter sets and have stated that I would love for us all to agree on a
common, more class-ified HTML output if everyone would concede to share
the same filter set and help improve the commonly used code.

I believe frontend developers were in general agreement that
module-specific style sheets would be a bad idea because they already
currently allow custom styles for their users and there would most
certainly be a conflict between what the module writer desires and for
what the user asks.

I believe I was against the proposal to replace the current filtering
mechanism with an xslt engine.

I think this sums up where we all stood the last time we discussed
this.  Have I misrepresented anyone, please speak up.


On 04/19/2011 04:41 PM, Greg Hellings wrote:
> On Tue, Apr 19, 2011 at 9:35 AM, DM Smith <dmsmith at crosswire.org> wrote:
>> In principle, I like the idea of CSS, but I think there are difficulties
>> with CSS. It presumes the elements and structure of what is being styled and
>> that the display can handle it.
> Are these problems greater than our current solution of "Sorry, nope,
> you can't style _anything_ because there are some niche cases where
> styling might be bad"?
>> CSS is a container model, but osis2mod unwinds the Book/Section/Paragraph
>> structure of a OSIS input into marker elements. How would CSS be written to
>> address this? Would it be written for the authored OSIS or the transformed
>> OSIS?
> Since CSS is a display technology and SWORD does not uses OSIS for
> display, clearly this question does not even apply.
>> SWORD has several renderers, HTML, RTF, plain text,.... How would CSS apply
>> in the delivery context of RTF?
> Can we stop even bringing up RTF? BibleCS's choice to use RTF means
> that it will always be limited to the problems inherent in that
> technology, just as every other front end has chosen HTML and is
> limited by that.  This is one of the niche cases I referred to above.
> "Well, BibleCS wouldn't be able to employ this SGML-based technology,
> so let's just ignore it and keep pooh-pooh-ing it."
>> For example, JSword transforms ThML, GBF, TEI and Plaintext into OSIS
>> (augmented with SWORD's usage of TEI). Even OSIS and TEI undergo minor
>> transformations. Then OSIS is converted into HTML. To what would the CSS
>> apply?
> To the HTML, of course. CSS can be applied directly to OSIS, but that
> would require JSword to write a massive amount of CSS to give styling
> to every OSIS element (just like it currently has an XSL file that
> transforms every OSIS element). So long as the application is using
> HTML, then the stylesheet would be applied directly to the HTML.
>> The ability of a frontend to use CSS might be a problem. If I remember
>> correctly, Xiphos was unable to use CSS. JSword/BD cannot at this time use
>> an external stylesheet. Also JSword uses Java's built in HTML renderer and
>> it is severely crippled and the HTML it requires is ancient.
> Xiphos currently uses two different display technologies: gtkmozembed,
> which is the Mozilla/Firefox/Gecko rendering engine. Where that is not
> available (Windows) it uses gtkhtml. This makes the Windows build in
> the same boat as JSword/BD at present. I am working with Karl, Terry
> and Matthew to update to gtkwebkit for all platforms - both because
> Mozilla is dropping support for embedding and because I want to see
> proper support on Windows for Xiphos.
> Of course, this line of argument is the same as digging up RTF.
> "Because the widget I have does not understand this 14 year old,
> fundamental web technology, clearly we should not support it."  BD is
> limited by its choice of display technologies just like Xiphos is.
> Xiphos has chosen to update its display technologies. BD would
> probably benefit from opting to do so as well. Additionally, with the
> CSS file on-disk, BD could simply insert the file directly into the
> rendered output, removing the need for the stylesheet to be external.
> I believe BPBible up until recently has used the wxHtml widget which
> is also limited. Correct me if I'm wrong, but I believe they are
> opting to update to a more functional widget. BibleCS, well.....
>> I think that if someone had the initiative to write generalized code that
>> would apply CSS to an OSIS module, use it successfully in a front-end, and
>> submit it for inclusion into SWORD that it might happen. There are a lot of
>> us that are quite willing to discuss an idea, but there are very few that
>> will actually implement. Those that do implement prioritize what is
>> important to them.
> I had support in BibleTime for this already in place when I brought it
> up last time. All that was needed was an agreement on a conf-file
> entry name by SWORD.  But the idea of using CSS was summarily rejected
> by the list. Similarly, Jaak gave a "Not on my watch" response to
> enabling the technology in BibleTime should SWORD reach an agreement
> on it. After all, then BibleTime would not be able to maintain
> absolute dominance over every pixel of display. Never mind that it
> already does not maintain this by virtue of allowing ThML-sourced
> documents to have CSS styling tags on them and allowing external CSS
> could actually reduce the impact of this loss of control.
> So I went to Xiphos and Karl was not impressed with the idea. Digging
> further turned up the fact that gtkhtml has about as good support for
> CSS as Java does. So I offered to help with the gtkwebkit move for a
> multiplicity of reasons, one being that hopefully Karl will consider
> adding support for external CSS files to Xiphos after the rendering
> engine supports them.  But if SWORD simply shoots them down again, for
> virtue of "That's very nice but MY rendering widget can't handle CSS"
> like happened before...
> Part of having a choice of front-ends is the fact that some are
> limited by their choices in technology. Perhaps BD has to sacrifice
> support for external CSS to be able to run everywhere Java exists.
> Perhaps BibleCS has to give up support for CSS because it chooses to
> stick with RTF for some reason. Does that mean that Xiphos, BibleTime,
> MacSword, BPBible, PocketSword, AndBible and whoever else chooses to
> use a modern HTML widget should be so limited?
> --Greg
> _______________________________________________
> 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