help-java2html
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-java2html] Re: java2html output 'bug'


From: Lorenzo Bettini
Subject: [Help-java2html] Re: java2html output 'bug'
Date: Fri, 23 Mar 2001 18:56:32 +0100

Robert Wetzel wrote:
> 
> Hi,

Hi Robert!

        Thanks for your mail :-)

> 
> wondered why my konqueror (Web-Browser and everything-in-all program
> of KDE2) doesn't display the HTMLized Java files correctly...

mhhh... I notice that too.

> 
> Output of konqueror:
> 
>   [...]
> 
>   // verwendete Waehrung  protected Currency myCurrency;
> 
>   // zu zahlender Betrag  private IntegerValue toPayValue;
> 
>   // gezahlter Betrag  private IntegerValue paidValue;
> 
>   [...]

Yes, this was the same error I noticed, I thought it was a bug in
Konqueror...

> 
> Netscape does it like this (which is like the Java source code):
> 
>   // verwendete Waehrung
>   protected Currency myCurrency;
> 
>   // zu zahlender Betrag
>   private IntegerValue toPayValue;
> 
>   // gezahlter Betrag
>   private IntegerValue paidValue;
> 
> 
> The generated HTML code of java2html looks like this:
> 
>   <span class="comment">// verwendete Waehrung
> </span>  <span class="keyword">protected</span> Currency myCurrency;
> 
>   <span class="comment">// zu zahlender Betrag
> </span>  <span class="keyword">private</span> IntegerValue toPayValue;
> 
>   <span class="comment">// gezahlter Betrag
> </span>  <span class="keyword">private</span> IntegerValue paidValue;

Actually I just translate the line break with another line break

> 
> Puzzled about what's right and what's wrong, I looked at the HTML
> specification and found this:
> 
>   B.3.1 Line breaks
> 
>   SGML (see [ISO8879], section 7.6.1) specifies that a line break
>   immediately following a start tag must be ignored, as must a line
>   break immediately before an end tag. This applies to all HTML
>   elements without exception.
> 
>   The following two HTML examples must be rendered identically:
> 
>   <P>Thomas is watching TV.</P>
>   <P>
>   Thomas is watching TV.
>   </P>
> 
>   So must the following two examples:
> 
>   <A>My favorite Website</A>
>   <A>
>   My favorite Website
>   </A>
> 
> konqueror does it right, Netscape not. An output which will be

Opsss... I didn't know about that...

> displayed correctly on both browsers should be like this:
> 
>   <span class="comment">// verwendete Waehrung</span>
>   <span class="keyword">protected</span> Currency myCurrency;
> 
>   <span class="comment">// zu zahlender Betrag</span>
>   <span class="keyword">private</span> IntegerValue toPayValue;
> 
>   <span class="comment">// gezahlter Betrag</span>
>   <span class="keyword">private</span> IntegerValue paidValue;
> 

You're right but it is a little bit harder to generate it like this,
unfortunately...
I have to think about it...

Actually the problem also arises because I use <pre></pre> where line
breaks (I mean \n characters) are interpreted like that... what if I
used <br>? I mean, do you think that the following solution would be
better (without using <pre>)?

<span class="comment">// verwendete Waehrung<br>
</span>  <span class="keyword">protected</span> Currency myCurrency;<br>

  <span class="comment">// zu zahlender Betrag<br>
</span>  <span class="keyword">private</span> IntegerValue
toPayValue;<br>

  <span class="comment">// gezahlter Betrag<br>
</span>  <span class="keyword">private</span> IntegerValue
paidValue;<br>

> Unfortunately I'm not able to correct the java2html code by myself
> to get this output (unsufficient skills with C, flex, bison, ... :-)
> 
> Thanks for your help

Thank you :-)

By the way would you like to subscribe to java2html mailing lists?

see you soon
        Lorenzo

-- 
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD student in Computer Science                    |
|  Florence - Italy         (Linux User # 158233)     |
|  Home Page        : http://w3.newnet.it/bettini     |
|           http://infostud.dsi.unifi.it/~bettini     |
|  Mail             : address@hidden            |
|  http://www.mokabyte.it       Java on line journal  |
|  http://music.dsi.unifi.it         XKlaim language  |
|  http://w3.newnet.it/bettini/purple     Cover Band  |
|  http://www.gnu.org/software/java2html & cpp2html   |
+-----------------------------------------------------+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]