[projectaon] Re: Freeway Warrior Action Chart

  • From: Iain Smith <iainsmith@xxxxxxxxx>
  • To: projectaon@xxxxxxxxxxxxx
  • Date: Fri, 21 Oct 2005 05:51:59 -0700 (PDT)

Work is progressing quicker than expected.  I've managed to get the pages
displaying in a readable manner, though I had to do a few nasty things to the
HTML by running each page through a filter process prior to display.  This is
required due to the HTML support in Java being woefully out of date. 
Apparently people have been screaming for improved HTML support since 2000,
but Sun haven't changed it much in that time.  Whenever a page is loaded by
the viewer, it performs the following:

1) Strip out the META tags; for some reason the pages wouldn't load when
feeding the HTML into the display panel when these were present.
2) Replace all the HTML4 self-closing tags (\>) with legacy ones (>), that
fixes the problem with superfluous ">" characters being displayed.
3) Replace all image references so they supply the full path to the image
file.   If this isn't done then the image files aren't displayed.  This seems
to work on  my Windows box, but I am unable to test on other platforms.

I found a further problem, which was related to text and link colouring.  The
background, text colour, alignment and fonts weren't working.  I've uploaded
a new version of the application here:

http://www.geocities.com/iainsmith/ActionChart/ActionChart-NoSS.jar

I managed to get the background and text colours fixed by updating the
colours in the <body> section of the HTML file to match those in the CSS. 
Theoretically this would be a simple change to the transformer which converts
the XML to HTML, but I've never seen this code so someone else will have to
comment on that one.  However this didn't help with the font, text size or
link colouring.  I dug around in the Java API and found a Stylesheet class
which allowed the stylesheet information from the CSS to be hardcoded into
the application and applied to the display panel internally.  That fixed the
fon size and link colouring to a certain extent, but caused other formatting
problems to appear.  I've uploaded a version with those changes here:

http://www.geocities.com/iainsmith/ActionChart/ActionChart-SS.jar

If any of you get time, can you please try these and report back as to which
you think is better and any critical errors you may get (exceptions on other
plaforms expecially).

Cheers,
Iain.

Oh, and yes, I do intend to put a "back" button in there somewhere at some
point ;)



                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Other related posts: