Possible bug in markup validator

Recently I tried to extend XHTML with several custom elements and noticed one validation related problem.
Consider this test page:

 <?xml version="1.0"?>
 <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
[<!ENTITY % Misc.class "| myElement"><!ELEMENT myElement (#PCDATA)>
 <!ATTLIST myElement xmlns CDATA #FIXED "http://mynamespace.me">]>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Compound document</title>
</head>
<body>
<myElement>Content</myElement>
</body>
</html>

myElement is added to XHTML 1.1 Miscellaneous content model and thus it is allowed (almost) anywhere in XHTML document. However W3C markup validator rejects it 
"document type does not allow element "myElement" here".
Now if you slightly modify DTD and rewrite previous sample as follows then document validates:
<?xml version="1.0"?>
<!DOCTYPE html [
<!ENTITY % Misc.class "| myElement"><!ELEMENT myElement (#PCDATA)>
<!ATTLIST myElement xmlns CDATA #FIXED "http://mynamespace.me">
<!ENTITY % xhtml SYSTEM "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> %xhtml;]>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Compound document</title>
</head>
<body>
<myElement>Content</myElement>
</body>
</html>

The problem is that these two DTDs are basically the same
(in one case XHTML 1.1 DTD is embedded as external DTD in second case it is embedded as external entity) so I assume that they should be handled identically by XML parsers (both samples are valid). I don't understand why W3C validator fails to validate first sample. Is it known bug or do I miss something?
-- 
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.

Powered by Outblaze

Received on Wednesday, 22 December 2004 14:25:37 UTC