W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: PHP code only allowed in XHTML 5?

From: Smylers <Smylers@stripey.com>
Date: Wed, 22 Jul 2009 06:01:14 +0100
To: HTMLWG <public-html@w3.org>
Message-ID: <20090722050114.GA2082@stripey.com>
Leif Halvard Silli writes:

> Suppose one wants to validate a page that embeds PHP, but that one
> wants  to do so /prior/ to the execution of the PHP script:
>        <?php Print "Hello, World!"; ?>

How can that be a meaningful thing to do?  What if the PHP script emits
something which causes an error, such as misnested tags?  The
conformance checker would be giving the author the impression that the
page is conforming, yet what gets sent to the browser clearly isn't.

And why should PHP have this ability and not other programming or
templating languages, such as those which use <% ... %> or [% ... %]?

If this is deemed a useful feature there's nothing stopping a
conformance checker developer providing an option for 'strip PHP tags',
which could be implemented as a pre-processing step to passing the
remaining content to an HTML 5 parser.  Or indeed for any other template
syntax, regardless of whether it resembles SGML processing instructions.
But doing so doesn't require the language itself to be warped to allow

Received on Wednesday, 22 July 2009 05:00:37 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:51 UTC