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

Philip Taylor (Webmaster) wrote:
>  I do not understand what benefit could accrue from allowing the
>  incorporation of a DOCTYPE that conflicts with the actual syntax of
>  the document.

The primary benefits of custom |DOCTYPE| declarations lie with custom 
|ENTITY| declarations; custom |DOCTYPE| declarations need not be used 
for validation purposes at all (although this should be allowed, if 
desired).

Thomas Broyer touched on these benefits in a reply to this mailing list 
thread [1]; unfortunately, using custom entities in an internal subset 
isn’t nearly as useful as being able to use such entities in an external 
subset where they can be used site‐wide. We might actually be able to do 
the latter if vendors like Mozilla were willing to accept fixes for bugs 
like Bugzilla@Mozilla Bug 22942 [2] that allow the use of external 
subsets (and where discussion was recently reignited by Henri moving 
part of this discussion from here to there starting at comment #97 [3]).

I’ll quote my own comment #105 [4] where I give examples of the benefits 
of custom |DOCTYPE| declarations:

>  I think this feature is more useful than for just character
>  references which can already be dealt with via numeric character
>  references or UTF-8. One example of where I’d find this feature
>  useful is in reducing the verbosity of repeated code; e.g., repeated
>  occurrences of |<abbr title="Extensible Hypertext Markup
>  Language">XHTML</abbr>| could be changed to the much less verbose and
>  more human‐readable |&XHTML;| via |<!ENTITY XHTML "<abbr
>  title='Extensible Hypertext Markup Language'>XHTML</abbr>">|. Another
>  example: |<a href="&YTV;jGUQDdfr2ZQ">&YTV;jGUQDdfr2ZQ</a>| via
>  |<!ENTITY YTV "http://www.youtube.com/watch?v=">|. I think that you
>  could also use this feature to implement external CSS style sheets
>  with constants/variables (until something like CSS Variables are
>  implemented, at least).

On the other hand, requiring |<!DOCTYPE html>| (with no subsets) or 
forbidding use of the |DOCTYPE| declaration would be totally useless and 
shuts out the possibility of things like this being possible down the 
road in an HTML 5 document.

— Patrick Garies

[1] http://lists.w3.org/Archives/Public/public-html/2008Jul/0297.html
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=22942
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=22942#c97
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=22942#c105

Received on Thursday, 24 July 2008 10:41:57 UTC