Strict rules not applied in the absence of a FPI

This is very odd (and relates to a suspected bug I wrote about
some days ago):

The following document incorrectly passes validation. It has
"loose", or "naked", text inside <body>, but this is not
reported as an error, although the DTD disallows it.

<?xml version="1.0" ?>
<!DOCTYPE html SYSTEM
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><title>Test</title>
</head><body>
Hello world
</body></html>

(Demo URL: http://www.cs.tut.fi/~jkorpela/test/hello.xhtml )

If I add a FPI, an error is reported, as expected. The apparent
explanation is that there's something wrong with the DTD at the
URL used but the internally stored DTD is correct. However, looking at the
DTD referred to by the URL, I see

<!ELEMENT body %Block;>

as expected.

Similar things happen for loose text inside <noscript>.

What is going on?

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Monday, 7 February 2005 17:40:22 UTC