I awoke this morning with an idea about solving the 3in1 W3C validation problem, and it worked! I’ve restored the validation links on my 3in1 page, so there’s one less problem page on my site.
It occurred to me that 3in1’s output shouldn’t be parsed as standard html, so a ‘’ exclusion is needed. After enclosing the 3in1 ‘echo’ statements in the cdata statement I was left with only 2 validation exceptions, both declarations without types. Here is what the main-copy code in my template looks like:
<div id="main-copy" style="width:870px; border:inset">
<div style="width:<?php echo $mainwidth ?>px;font: 72% Tahoma;">
<![CDATA[
<?php
# Header with name & update-times (optional)
echo $wxallupdated;
echo '<h2>'.get_lang("WXSIM Forecast for:").' '.$wxallcity.'</h2>';
# Theese can be used stand alone or together
echo $wxalltop; # "Top-forecast"
echo $wxallgraph; # Graph
echo $wxallmain; # Tabs
?>
]]>
</div>
<?php
echo $wxallfooter;
?>
</div><!-- end main-copy -->
The untyped script declarations occurred in wxall.lastret.php’s $wxallhead and $wxallfooter declarations. This is the revised code:
$wxallhead = '
<script type="text/javascript">
// COMMERCIAL USE OF THIS FORECAST-SCRIPT STRICTLY FORBIDDEN.
var docready=[],$=function(){return{ready:function(fn){docready.push(fn)}}};
</script>
<link rel="stylesheet" type="text/css" media="screen" href="'.$wxallmainfolder.'css/wxall.css?'.$cssage.'" />
';
if($useustemp==1){$wxallhead.= '<link rel="stylesheet" type="text/css" media="screen" href="'.$wxallmainfolder.'css/US/wxall.css" />';}
$wxallfooter = '
<script type="text/javascript" src="'.$wxallmainfolder.'js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="'.$wxallmainfolder.'js/jquery-ui-1.9.1.min.js"></script>
<script type="text/javascript">$=jQuery;jQuery(document).ready(function(){for(n in docready){docready[n]()}});</script>
<script type="text/javascript" src="'.$wxallmainfolder.'js/highcharts.js"></script>
<script type="text/javascript" src="'.$wxallmainfolder.'js/wxsim.js"></script>
';
Validation is now successful!