Re: JTidy

On Sun, 15 Feb 2004 10:40:38 +0100, Pinhas, Yaacov <yaacov.pinhas@sap.com>  
wrote:

> Hi There,
>
> My name is Kobi and I'm using the Jtidy.

I've only got experience with Tidy, but I assume my answers will be valid  
for JTidy as well.

> I would like to know if the Jtidy parse the HTML into a valid HTML  
> according to the W3C recommendation?

Yes, that is the purpose of the program.

> Is there any flag that will allow me to parse non regular tags for  
> example:
> I want to "teach" the Jtidy that the <form> tag can be a child of the  
> <table>
> tag, is it possible?

Nope, that is not possible. Tidy will not create such invalid output. It  
can be teached to handle unknown elements as generic inline or block-level  
elements. But FORM is a known element, and even it that was not the case:  
Tidy knows that the TABLE element can only contain a few specific elements  
(CAPTION, COL, COLGROUP, THEAD, TFOOT, TBODY and TR).

Note that the illegal nesting of FORM directly in TABLE can cause problems  
for some browsers, and is never needed to achieve visual effects. For  
example, if you are worried about unwanted spacing before or after the  
form,

form {margin: 0;}

in your stylesheet will remove all of it.

-- 
The Web is a procrastination apparatus:    |  Rijk van Geijtenbeek
It can absorb as much time as              |   Documentation & QA
is required to ensure that you             |   Opera Software ASA
won't get any real work done.  - J.Nielsen | mailto:rijk@opera.com M

Received on Sunday, 15 February 2004 05:41:12 UTC