Re: Tidy Enhancement Request

On Mon, 18 Oct 1999, Blaine Helmick wrote:

> In our implementation of HTML, we rely on server side includes
> to populate many areas of our code. One such area is the BODY
> tag because we put an extensive amount of information within
> this tag and need it standardized throughout our site.
> 
> What this means is that none of our files contain a BODY tag,
> just a Server Side include at the beginning which contains all
> of this information. The problem I'm facing is that TIDY
> enforces a BODY tag into any file we process with it.
> 
> I'd love to see a feature added to TIDY allowing you to turn off
> checking for tags like BODY, HTML, TITLE, and HEAD. This would
> allow us to automate TIDY. As of now, I have to manually run it
> on each individual HTML file, then strip the BODY tags from the
> documents.

Thanks for the explanation. Sadly, I don't see an easy way to give
you what you want, as Tidy is basically a just a smart parser that
generates a valid HTML parse tree then pretty prints it out. A work
around would be to use a server-side include for just the attributes
of the body element. Tidy currently knows about several different
kinds of preprocessing syntax you could use for this purpose.

In general, it is impractical to verify files involving a
preprocessor without being able to compute the preprocessing
instructions using the actual data they will be run on. Tidy is
useful when the preprocessor adds attributes or elements, but
not when these are an essential part of the document.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2984 (or 2521) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Monday, 18 October 1999 11:29:14 UTC