<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gabriel,<br>
I just checked in a change to XSLTProperties and the classes that
used it. It now supports all the parameters of our style sheet. This
should give you the ability to provide your own css if you like and to
change the font size.<br>
<br>
I thought about the line spacing. In the ESV, Psalm 29, for example,
each verse already starts on its own line. When you set BibleDesktop to
display verses on new lines, it then adds a newline at the end of each
verse, causing it to double space. Elsewhere, paragraphs of verses have
extra spacing, too. In these cases, adding a blank line after each
verse gets to be too much spacing. Not sure what the best approach
would be.<br>
<br>
DM<br>
<br>
Gabriel Valencia wrote:
<blockquote cite="midD88F0014-D080-4857-8346-09CF285A56AD@mac.com"
type="cite">
<pre wrap="">Hey DM,
Thanks for the leads. Please see my replies below.
--
Gabriel Valencia
<a class="moz-txt-link-rfc2396E" href="mailto:gee4vee@mac.com"><gee4vee@mac.com></a>
Are you a GOOD person? Take this test to find out! <a class="moz-txt-link-freetext" href="http://">http://</a>
<a class="moz-txt-link-abbreviated" href="http://www.wayofthemaster.com/goodperson.shtml">www.wayofthemaster.com/goodperson.shtml</a>
On Apr 18, 2007, at 12:00 PM, <a class="moz-txt-link-abbreviated" href="mailto:jsword-devel-request@crosswire.org">jsword-devel-request@crosswire.org</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Send jsword-devel mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:jsword-devel-request@crosswire.org">jsword-devel-request@crosswire.org</a>
You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:jsword-devel-owner@crosswire.org">jsword-devel-owner@crosswire.org</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of jsword-devel digest..."
Today's Topics:
1. Re: Modifying the display of texts (DM Smith)
----------------------------------------------------------------------
Message: 1
Date: Tue, 17 Apr 2007 21:34:46 -0400
From: DM Smith <a class="moz-txt-link-rfc2396E" href="mailto:dmsmith555@yahoo.com"><dmsmith555@yahoo.com></a>
Subject: Re: [jsword-devel] Modifying the display of texts
To: J-Sword Developers Mailing List <a class="moz-txt-link-rfc2396E" href="mailto:jsword-devel@crosswire.org"><jsword-devel@crosswire.org></a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:F1FDC2E8-DA3F-4BC2-83A1-BCCC5CAEFBFE@yahoo.com"><F1FDC2E8-DA3F-4BC2-83A1-BCCC5CAEFBFE@yahoo.com></a>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Gabriel,
I need a bit more info. See below:
On Apr 13, 2007, at 2:41 PM, Gabriel Valencia wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hey all
I have been incorporating the JSword API into a program I am working
on for displaying Biblical texts on a projector for use in Bible
studies, sermons, etc. Right now, I use the JSword APIs to retrieve
Bible texts and I use BibleDesktop components to display them. I am
still very new with XML, XSLT, etc., but one thing I would like to
change for the program is the display format that BibleDesktop uses
by default. For example, in BibleDesktop, the verses are usually
displayed line by line, but when you put it on a projector, it would
be nice to be able to increase the spacing to make it easier to read,
</pre>
</blockquote>
<pre wrap="">What kind of spacing do you mean? Space between lines, words or
letters? Or between verses?
</pre>
</blockquote>
<pre wrap=""><!---->
Mainly between verses, but I am also considering between lines.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">and perhaps increasing the side margins.
</pre>
</blockquote>
<pre wrap="">
This should be easy. I'll see what I can find out. It should be just
a css change.
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Also, I figured out how to
change the font size, but it requires (as far as I can tell) creating
a custom BookDataDisplay and modifying the HTML
TransformingSAXEventProvider's properties.
</pre>
</blockquote>
<pre wrap="">I think there is a bit easier way. XSLTProperty.java has a bunch of
static objects which represent each of the parameters that are
currently recognized by BibleDesktop's xslt style sheet. Just modify
these and then use the BookDataDisplay returned by
BookDataDisplayFactory to do the displaying. (Currently this will use
TextPaneBookDataDisplay, but later will be able to use a full fledged
browser like IE or Mozilla)
</pre>
</blockquote>
<pre wrap=""><!---->
Unfortunately, XSLTProperty's set of static objects doesn't include
the font size parameter. How about I expose it? :) I don't know the
implications of making changes to this class, so I'll hold off on that.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">If I understand correctly, BibleDesktop uses XSLT to determine how
text gets displayed.
</pre>
</blockquote>
<pre wrap="">
XSLT is used to take the OSIS and transform it into HTML. It also
supplies a default CSS style sheet to do the actual "styling" of the
html. I can't remember off the top of my head (and will look into it
if you wish) but you should be able to supply your own CSS style
sheet to override the default). Our xslt is found at bibledesktop/src/
main/resources/style/simple.xslt and near the top is the default css.
</pre>
<blockquote type="cite">
<pre wrap="">Is there any way to modify this style sheet or
use a custom one?
</pre>
</blockquote>
<pre wrap="">
You can either modify the css or the xslt with one place in your
~/.jsword directory (the actual location depends upon whether you are
on Mac, Linux or Windows; Mac from what I see from your email
address.)
</pre>
</blockquote>
<pre wrap=""><!---->
I don't seem to have a ~/.jsword directory, and I am on a Mac. I'm
assuming I can create the directory and drop my own xslt in there
with a different CSS and it'll work? As far as actually building my
project and putting everything in a jar, will that work?
</pre>
<blockquote type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">Am I on the right track for what I want to do, or
is there an easier way to modify all these properties? Any guidance
would be appreciated.
</pre>
</blockquote>
<pre wrap="">
So to re-iterate, you can supply a replacement for the xslt file as a
whole, or you can supply a css style sheet.
</pre>
</blockquote>
<pre wrap=""><!---->
I see that simple.xsl has a css parameter. If I understand the code
correctly, I can set this parameter to the absolute URL of my own
stylesheet. XSLTProperty doesn't expose this parameter either though,
so it's similar to the font issue.
</pre>
<blockquote type="cite">
<pre wrap="">I don't know your skill level so I don't know if this is enough info
or not.
</pre>
</blockquote>
<pre wrap=""><!---->
This definitely helps. At least I know where BD is getting these
properties from. I just don't want to reinvent the wheel if necessary
(like I did by creating a custom BookDataDisplay as I mentioned), but
I need to get into the API more to see how it all works.
</pre>
<blockquote type="cite">
<pre wrap="">It will take me a bit of time to figure out the details, so let me
know if you need more help and which you would like to do.
</pre>
</blockquote>
<pre wrap=""><!---->
Ultimately, I would like the program to be able to modify these
settings at run-time so that users can change the look and feel of
the passage display including adding background colors/images, and so
on. For now, for our small group study, I just hope to make large
sections of text a little easier to read on a projector.
Thank you for taking the time to look into this. God bless!
</pre>
<blockquote type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">God bless your labor in the Lord!
--
Gabriel Valencia
<a class="moz-txt-link-rfc2396E" href="mailto:gee4vee@mac.com"><gee4vee@mac.com></a>
Are you a GOOD person? Take this test to find out! <a class="moz-txt-link-freetext" href="http://">http://</a>
<a class="moz-txt-link-abbreviated" href="http://www.wayofthemaster.com/goodperson.shtml">www.wayofthemaster.com/goodperson.shtml</a>
</pre>
</blockquote>
<pre wrap="">
------------------------------
_______________________________________________
jsword-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
End of jsword-devel Digest, Vol 35, Issue 6
*******************************************
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
jsword-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>