- From: Michael Adams <linux_mike@paradise.net.nz>
- Date: Fri, 23 Mar 2007 23:53:15 +1200
- To: www-validator@w3.org
On Thu, 22 Mar 2007 21:24:39 -0400 Stephanie Troeth wrote: > > When you are creating templates using any kind of templating system > that is part of a content management system, often you are only > creating markup for a module that will eventually appear within a > greater page. > > Hence, if you just want to validate the chunk of code that applies to > what you are building, a validator for snippets is immensely useful. > Not sure if you are using PHP or another system but how about just setting up a wrapper that includes the relevant snippet and validate that. ************ <!DOCTYPE ...as required...> <html> <head><title>Snippet tester</title></head> <body> <?php include ("snippet.php"); ?> </body> </html> *********** You could improve this by entering the address of the file into a posted variable for inclusion: **** <?php $snippet_filname = $_POST['snippet']; include ($snippet_filename); ?> **** Getting the file to call the validator itself once generated is beyond my meagre PHP skills but is probably do-able. -- Michael Linux: The OS people choose without $200,000,000 of persuasion.
Received on Friday, 23 March 2007 11:52:00 UTC