On Tue, Apr 19, 2011 at 9:35 AM, DM Smith <dmsm...@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@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page