| error, Duplicate tag (HTML). [message #59699] | 
Sun, 28 October 2007 00:01   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: samw3office.gmail.com 
 
Hello All, 
 
I'm getting a "Duplicate tag (HTML)." error on the second <DOCTYPE> tag  
in my script as well as a "Duplicate tag (html)." warning on the second  
<html> tag. 
 
Is PDT doing this?  and if so, can I set it somehow to not do it? (like  
ignore or something?) 
 
Thanks! 
 
Sam Washburn 
 
The script I'm using boils down to this... 
 
<? 
if($something) { 
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  
"http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
<body> 
DISPLAY ONE FORM 
</body> 
</html> 
<? 
} else { 
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  
"http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
<body> 
DISPLAY DIFFERENT FORM 
</body> 
</html> 
<? 
} 
?>
 |  
 |  
  | 
 | 
 | 
| Re: error, Duplicate tag (HTML). [message #59794 is a reply to message #59770] | 
Mon, 29 October 2007 02:45   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
It is not a bug of the validator, since the validator can't understand  
(semantically) the meaning of the program, it is an undecidable question.  
 
Again, you should state the doctype only once in your document, for  
example you can write a function that writes the doctype and then you call  
it from the two branches that need to use it.
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.04225 seconds