Re: A question of style?!

Tidy moves the first PHP tag into the second line, after the doctype 
declaration... I wonder why?
It should rather be in the first line after <BODY>...

Also, the second PHP tag should stay in column 1, shouldn't it?


><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
><?php
>   include  ("common.php3");
>   mkheader ("Page title and <h1>-tag contents", "menu
>specifier");
>?>
><html>
><head>
><meta name="generator" content="HTML Tidy, see www.w3.org">
><title>Untitled document cleaned by HTML Tidy</title>
></head>
><body>
>(some text) <?php mkfooter(); ?>
></body>
></html>


At 14:56 04.09.2000 +0200, Stephan Engelke wrote:
>Hi Sebastian,
>
>Sebastian Lange writes:
> > I basically do the same trick, define a couple PHP variables, include a
> > header file, then comes the page content, and then I include a footer file.
> >
> > For the content cleaning, I added the option "body-only" to my online
> > version of tidy [http://www.sl-chat.de/Tidy/?body-only=yes]... and then I
> > let some lower charges copy and paste the text into tidy and from there
> > into my template files... ;-)
>
>The option sound nice enough - I just seem to have a problem with it:
>
>When I paste my example file into the textarea, the first <?php
>... ?>- tag's contents are removed.
>--- top of file ---
><?php
>   include  ("common.php3");
>   mkheader ("Page title and <h1>-tag contents", "menu specifier");
>?>
>
>(some text)
>
><?php mkfooter(); ?>
>--- end of file ---
>
>is turned into
>--- top of file ---
>(some text) <?php mkfooter(); ?>
>--- end of file ---
>
>What am I missing?
>
>Regards -- Stephan
>--
>Stephan Engelke                                                engelke@gmx.net

--
Sebastian Lange
http://www.sl-chat.de/
Maybe the first chat site that validates as HTML
4.0 even though user input may contain HTML codes.

Courtesy to Dave Raggett's HTML Tidy:
http://www.w3.org/People/Raggett/tidy/

Tidy your documents ONLINE:
http://www.sl-chat.de/Tidy/

Received on Monday, 4 September 2000 09:39:21 UTC