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.

mytidy.sh:

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


Command:

mytidy.sh document.txt


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

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


-- 
Klaus Johannes Rusch
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/
Received on Tuesday, 26 February 2002 14:26:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT