I'm new to this SSI but basically I've done really simple tries by the book, as it were, and they come out looking right. But when I test them here:
http://validator.w3.org/
There are errors related to the fact that the "DOCTYPE" from the original (or included) html is showing up in the "script".
Example of what this script looks like before (when I wrote it):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<!--#include virtual="/ssi-test/css-in.html" -->
</body>
</html>
And when processed and read through the web:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
.bigfont {
font-family: Arial, Helvetica, sans-serif;
font-size: 36px;
font-style: normal;
font-weight: bold;
text-decoration: line-through;
}
table {background: #9999CC
}
body {
background-color: #FFFF33;
}
</style>
</head>
<body>
<p class="bigfont">I WENT RUNNIN THROUGH THE FOREST</p>
<p>I WENT RUNNIN THROUGH THE FOREST</p>
<table width="717" height="251" border="0" cellpadding="0" cellspacing="5">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
</body>
</html>
Error 1 example:
Line 9, Column 2: "DOCTYPE" declaration not allowed in instance .
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
Error 2 example:
Line 10, Column 42: document type does not allow element "html" here .
<html xmlns="http://www.w3.org/1999/xhtml">
✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Sorry this is so long.
Does anyone know what this is about?
Thanks much!



Reply With Quote


Bookmarks