- From: David Dorward <david@dorward.me.uk>
- Date: Tue, 22 Aug 2017 19:54:29 +0100
- To: "Scott A Tovey" <satovey@yahoo.com>, "www-validator Community" <www-validator@w3.org>
- Message-ID: <793D5943-7BAD-4C98-80A4-CD109D18F43B@dorward.me.uk>
On 22 Aug 2017, at 17:03, Scott A Tovey wrote: > My expectation of <?PHP tag handling is contrary to your assumption. I make no assumptions. I’m describing what the validator is designed to do. > The validator should be able to recognize the start and end tags for > the > sole purpose of disregarding and ignoring everything inside. This > would > eliminate the necessity of throwing an error because it is not > validating > code. That would be largely pointless. Take, for example, this contrived but trivial example: <?php if (someCondition() { ?> <div class=“foo”> <?php } else { ?> <div class=“bar”> <?php } ?> </div> If the validator were to ignore the PHP, then it would see two start tags with one end tag. This would cause a cascade of errors throughout the rest of the document. Any ignored PHP would render the rest of the validation process untrustworthy. > This may also be necessary for the <script tag as well. The validator parses the <script> element according to the rules of HTML (or XHTML). > One last thing. I had better results by uploading the files, that > would seem > to point to an issue when the page is being dynamically generated with > as > all of my pages on the site have the navigation bar and some content > generated and applied with javascripts.scripts unless it is a php > script. Yes, that does suggest you are generating HTML with errors in it. You should fix them.
Received on Tuesday, 22 August 2017 18:54:58 UTC