This discussion is archived
6 Replies Latest reply: Sep 7, 2010 4:48 AM by 793415 RSS

Displaying issues

843810 Newbie
Currently Being Moderated
Hello Everyone,

I'm investigating JavaHelp possibilities and I've met several issues I'd like to discuss. Some of them can be eliminated via CSS style, but others not.

(1) every anchor <a name=...> produces white space as if an empty paragraph would be used there. CSS rule a[name] {display:none} doesn't help.
(2) trailing space of inline images is missing. Only nbsp are kept, if they are used instead.
(3) em units has turned out to be unsupported so I have to use 'px'
(4) CSS rule element > * seem to be unsupported so every combination have to be specified directly :-(

The first one is the most disturbing and I cannot figure out how to eliminate it. Has anybody any experience with it?
Thanks in advance for any tip.

Regards,
Jan
  • 1. Re: Displaying issues
    793415 Pro
    Currently Being Moderated
    honyk wrote:
    ..Has anybody any experience with it?
    Some. Post an SSCCE *(<- link)* with HTML hard coded in it. and I'll have a look over it.
  • 2. Re: Displaying issues
    843810 Newbie
    Currently Being Moderated
    I have had problems with the <img src="..." /> tag also. It rendered the /> as plain text for some reason. I took out the "/>" and replaced it with </img> instead and it worked.
  • 3. Re: Displaying issues
    793415 Pro
    Currently Being Moderated
    Reign_Of_Chaos wrote:
    I have had problems with the <img src="..." /> tag also.
    That is invalid HTML. It is valid XML, but JEditorPane (used by Java Help) was only intended for HTML 3.2.

    I could not be bothered trawling around for a 3.2 spec., but see the [HTML 4.01 description of the img element|http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2] for further details.
    ..It rendered the /> as plain text for some reason. I took out the "/>" and replaced it with </img> instead and it worked.
    I suggest validating the HTML against a DTD before making random changes.
  • 4. Re: Displaying issues
    843810 Newbie
    Currently Being Moderated
    Thank you for pointing that out. I'll take note next time I need to make changes.
  • 5. Re: Displaying issues
    843810 Newbie
    Currently Being Moderated
    Hi Andrew,

    (1) during preparation SSCCE I found that 'empty line' problem is not caused by anchors as I had thougt. I completely overlooked empty <p> elements there, which are ignored by common web browser, but in JavaHelp there were preserved. So I made several changes in XSLT template which produces HTML code so I avoided it.

    (2) Inline images I am wrapping by hair space character U+200A. It preserves standard spaces without any other consequences (non breaking space is not ideal in every case...)

    (3) I've completely rewritten css style for JavaHelp. It uses px now as units. Nasty, but it works.

    (4) The same as the previous. I had to hardcode all the combinations.

    There were additional issues with borders as there is not possible to use border="solid silver 1px", but three properties border-color, border-style, border-top-width.

    So finally I got what I've wanted. I didn't expected it is possible.

    Regards,

    Jan
  • 6. Re: Displaying issues
    793415 Pro
    Currently Being Moderated
    honyk wrote:
    ..So finally I got what I've wanted. ..
    I am glad to hear you got it working. :-)
    ..I didn't expected it is possible.
    It takes some work (as your solution confirms), but JEditorPane is capable of rendering some surprisingly good results.