Re: Doctype on text/html Pages (Was: [author-guide] Character Entity References Chart)

On Wed, Jul 23, 2008 at 3:23 PM, Robert J Burns wrote:
>
> On Jul 23, 2008, at 2:30 PM, Julian Reschke wrote:
>
>> Actually: not at all.
>>
>> I'm not sure why we would want to restrict the XML serialization in any
>> way.
>>
>> Recipients are supposed to use an XML parser, and can use both MIME type
>> and XML namespaces to detect what they're looking it.
>
> I think I already answered it in the part you snipped. What is your use case
> for allowing any doctype declaration? What problem does that address?

<!DOCTYPE html [
<!ENTITY copyrightHead SYSTEM "copyrightHead">
<!ENTITY copyrightFooter SYSTEM "copyrightFooter">
]>
<html xmlns="...>
<head>
<title>...</title>
&copyrightHead;
</head>
<body>
...
&copyrightFooter;
</body>
</html>

where &copyrightHead; generates a <link rel="copyright"/> and/or <meta
name="copyright"/> or what you want; and &copyrightFooter; generates a
<small class="copyright">(c) Copyright 2008 XXX</small>

> We have only one doctype declaration for the text/html serialization so why
> do we need infinite doctype declarations for the XML serialization,

Because it's XML.


-- 
Thomas Broyer

Received on Wednesday, 23 July 2008 13:37:23 UTC