W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

Re: Bug: HTML Tidy and tidying up Server-side Includes (SSI)

From: Klaus Johannes Rusch <KlausRusch@atmedia.net>
Date: Tue, 26 Feb 2002 20:14:38 CET
Message-Id: <200202261926.OAA05876@tux.w3.org>
To: "PRICE, Paul" <Paul.Price@qed.qld.gov.au>
Cc: html-tidy@w3.org
In <C7A0A0979B09D311877400A024B3D410041B2082@eco88340009.qed.qld.gov.au>, "PRICE, Paul" <Paul.Price@qed.qld.gov.au> writes:
> >So, we have someone who has HTML fragments that are to be treated as parts
> of a <body>, including all comments.
>   `tidy --show-body-only yes document.txt`

Create a shell script like the one below (or a BAT/CMD file for Windows) that 
adds surrounds the HTML fragments with <body> </body> tags, then run that 
script instead of tidy directly, i.e.


(echo "<body>"; cat "$1"; echo "</body>") | tidy --show-body-only yes


mytidy.sh document.txt

Alternatively change your include structure to place the main structural 
elements in each source file, i.e.

<!--#include virtual="/header.inc" -->
<!--#include virtual="/navigation.inc" -->
<!--#include virtual="/footer.inc" -->

Klaus Johannes Rusch
Received on Tuesday, 26 February 2002 14:26:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:51 UTC