validering af XHTML og PHP
Kan det være rigtigt at man ikke kan bruge XHTML standaren når der er PHP-kode i filen. Jeg kan i hvert fald ikke validere den inde på W3C.com.Feks.
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"da\">
<head><title>bla</title></head>
<body>
<?
echo \"Skriv dette\";
?>
</body>
</html>
Jeg får følgende fejl:
Warnings
Warning: No Character Encoding detected! To assure correct validation, processing, and display, it is important that the character encoding is properly labeled. Further explanations.
Below are the results of checking this document for XML well-formedness and validity.
Line 8, column 0:
sdafsd
^Error: text is not allowed here; try wrapping the text in a more descriptive container
Line 11, column 6:
</body>
^Error: missing a required sub-element of \"body\"
