[jsword-devel] display methods
DM Smith
jsword-devel@crosswire.org
Wed, 17 Mar 2004 11:16:47 -0500
My personal bias on web page development from XML source is that XSLT should
be used to do structural transformations, CSS should be used to do styling
and JavaScript should add bells and whistles, if desirable.
Joe wrote on Tue, 16 Mar 2004
>
>
>So JEditorPane in JDK1.4 makes a fairly lousy HTML renderer. I've been
>weighing up some alternatives.
>The requirements are, it must:
>- work using XML input
>- be easily understood for the developer (which fairly much means HTML)
>- work over webstart
>- be freely re-distributable
>- allow some DHTML like flexibility
What JavaScript features would be desirable?
>
>Some of those are tough requirements, but here's what I've come up with.
>
>JEditorPane in JDK1.4:
> does not do JavaScript or CSS level anything
I have notice in JSword that when Strong's numbering is rendered the words
all run together because the space between words (In this case, it would be
between <A href="">word</A> tags) is missing. I have not looked into where
the hypertext is created yet.
What are the other shortcomings (other than CSS or JavaScript)?
If I had the list of shortcomings, I think I might be able to figure out how
to get it to look good using 1.4.
>
>JEditorPane in JDK1.5:
> big improvement - does CSS, but not JavaScript. Not released for
>another 6 months?
And with the desire to support the Mac platform, it may be longer before it
is supported there.
>
>JRex (Embed Mozilla)
> very good html displayer, but probably very complex to get working and
>installed, especially over WebStart. JNI+webstart anyone? see
>http://jrex.mozdev.org/index.html
JRex requires mozilla to be installed and the application embedding JRex to
know where that is. Also, I have had problems upgrading mozilla from 1.3 to
1.4 or higher and was not successful until I re-installed windows XP (for
other reasons).
>
>Jazilla (Mozilla re-write in Java)
> Interesting project, but one that seems more interested in XUL than the
>Java renderer, proceeding slowly. see
>http://jazilla.mcbridematt.sniperhq.net/
The documentation of the supported capabilites is not promising. You can see
the supported set here:
https://sourceforge.net/docman/display_doc.php?docid=21531&group_id=582
>
>JXWB (OSS Java Browser)
> Commercial software made free. Works well with Swing (includes
>customized implementations of javax.swing.text.Document and
>javax.swing.text.EditorKit) Things have moved on quite a bit recently. See
>http://sourceforge.net/projects/jxwb
This looks like very early alpha code. The 0.1 release was the first of this
year.
>
>IceBrowser
> Not free but otherwise excellent solution supporting all major web
>standards. See http://www.icesoft.com/products/icebrowser.html
>
>SWT Browser Component
> Don't think we could easily embed an SWT component in swing (since SWT
>is heavyweight in AWT speak) and I don't particularly want to re-write the
>whole app in SWT.
I think the other drawback in using SWT is that a lot fewer developers are
familiar with it and this would slow down collaborative development.
Using SWT directly or indirectly will complicate the webstart jnlp file as
we willl need to have os specific jars (since swt is heavyweight). Not that
big a deal. For Unix users we would have to choose for them whether they use
SWT with a gtk, photon or motif interface. This may give a conflicting look
and feel with what a unix user expects.
Also it will add an additional 1Meg to the download. This is not that much
but it all adds up. Especially over dialup. Who will be the ultimate end
users? What kind of hardware platform do they use?
>However there are 2 projects to allow use of SWT from a swing API. SwingWT
>is a swing-like proxy to SWT (http://swingwt.sourceforge.net/) and MasterCL
>(http://chrriis.brainlex.com/projects/mastercl/) will allow you to
>dynamically swap package names to make the whole of swing use SWT
>dynamically.
>It is possible to use SWT from webstart - irate radio do it
>(http://irate.sf.net/) although their build scripts are not very helpful.
>
SwingWT documentation lists that it still needs to do the following:
* Printing support (not available in SWT/GTK2 so may be a while!)
* Drag and drop support
* JEditorPane support for anything but read only HTML
>FOP -> PNG
> FOP is XSL:FO renderer (http://xml.apache.org/fop/index.html) that can
>create PDFs and various graphics files. Could give very slick output, but
>no DHTML, quite slow and FO is not easy to use. Probably not one of the
>best ideas.
I have used Tex to produce PDFs and it produces some very good looking
documents. However, I don't like PDF as the core solution, primarily because
they are hard for the end user to work with the docs as they wish. If we
were delivering licensed documents where cut and paste, printing, drag and
drop needed to be controlled, I can see how it would make sense. I think it
also makes sense as an alternate delivery mechanism. That is as a "Save
As..." target.
>
>Dynamic Swing GUI
> There are plenty of XML->Swing converters. JDK 1.4 even includes one.
>Maybe we could write a OSIS->SwingXML converter in XSL and then render OSIS
>text in swing components. Could be very fancy. XSL could be complex.
>
This sounds cool. Do you know of a demo of this kind of conversion?
>
>Does anyone have any experience in any of these, or any alternative
>solutions?
Just brainstorming: Have you given any thought about rendering directly in
the user's default browser?
>I'm thinking it would be good to have a pluggable system, but I'm not sure
>which of these to turn to first. I'm thinking (in order) JXWB, Dynamic
>Swing GUI, SwingWT, JRex at the moment.
>
>Thanks.
>
>Joe.
>
>
>_______________________________________________
>jsword-devel mailing list
>jsword-devel@crosswire.org
>http://www.crosswire.org/mailman/listinfo/jsword-devel
_________________________________________________________________
Check out MSN PC Safety & Security to help ensure your PC is protected and
safe. http://specials.msn.com/msn/security.asp