validation issues nad other things

Dumas Patrice <[email protected]> Thu, 27 Mar 2003 19:22:46 +0100
Newsgroups gmane.comp.tex.texi2html.devel
Message-ID <[email protected]>
Hi,

I have just commited a lot of code, with a lot of rewrite of texi2html. The 
resulting html is almost valid, but not totally, and I don't see how to
have this become valid. 

- problem of <pre>
Most issues come from <pre>. Indeed, <pre>
accepts very few elements within. For example, <table>, <img>, <small>
are forbidden. This is very bad for nested constructs. For example
a @display @example produces invalid html, although it does the right thing.
Indeed it could be possible to produce a different html when in pre.
This is allready done for some things (no paragraph, no end of line
after <a name="...."> for index entries...) but is it really worth ?
Does anybody have an idea on how to do that cleanly ?

- <a name="..."> within <a href="...">
Another issue come from the impossibility to have <a> within <a>. This 
forbids constructs like a footnote or an anchor in a crossref... Not that 
it is really usefull ;-).

- <p> after <ul>, <ol>
And another issue is with constructs like
@enumerate
no item !
@item an item
@end enumerate

Something like (I don't know if it is ul or ol)
<ul>
<p>no item !</p>
<li><p>an item</p></li>
</ul>
isn't valid. There has to be a <li> after <ul>. How to have it right 
(I don't want the 'no item !' to be enumerated).

Other topics:

- rendering of menu comments
I have another problem with menu comments. I don't know how to render them.
Some people do things like
* node::
--------------
the comment
--------------
* other node::

It seems to me that they expect a <pre> environment ? Does anybody have an 
idea about which html elements to enclose menu comments in ?
Currently it is (as it is in a table):
<th><td>

I think it is nice to keep <th><td>, but maybe adding a pre within would be 
nice ?

- formatting functions
On another topic, I isolated the html formatting from the texinfo parsing 
in the code I did. Maybe it would be nice to put all the functions doing
formatting in an init file and use the same trick than with T2H_print...,
call references to subroutines. Is there another way to do ? What do
you think about having all these functions in texi2html.init ?

Pat