Re: hide-endtags

On 21 Mar 2001, at 21:36, Tim Tabor wrote:

> Howdy.  I've got a small issue with this option.
> 
> [...]
> 
> And similarly for large files - it strips off the <html> and
> <body> tags.

You didn't cite a target HTML version, but the DTD for HTML 4.01 has, for 
the HTML and BODY elements:

  <!ELEMENT HTML O O [...]  -->
  <!ELEMENT BODY O O [...]  -->

...which indicates that both the start and end tags for those elements are 
optional.

Therefore, I'm not clear as to what you prefer.  Is your issue that the 
option should be renamed to reflect the omission of *all* optional tags, 
and not simply optional end tags, or that HTML Tidy should omit optional 
end tags but not optional start tags?  In other words, do you recommend 
renaming the option and keeping the current behavior, or do you prefer that 
Tidy instead generate:

   <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
   <meta name="generator" content="HTML Tidy, see www.w3.org">
   <title></title>
   <html>
   <body>
   hello

for your test case?

                                      -- Dave

Received on Thursday, 22 March 2001 01:29:24 UTC