W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 2005

Re: HTML 4.01 Specification - query

From: David Håsäther <hasather@gmail.com>
Date: Fri, 06 May 2005 20:24:27 +0200
Message-ID: <427BB65B.2040709@gmail.com>
To: www-html-editor@w3.org

Norman Paterson wrote:

 > Not sure if this is a typo or my mistake.  Section 7.4.2 of
 > REC-HTML401-19991224 has:
 >
 >     <!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title
 > -->
 >
 > where
 >
 >     <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" --
 > repeatable head elements -->
 >
 > I don't see why -(%head.misc;) is necessary in the element definition
 > of TITLE.

This is beacuse of the element declaration for HEAD:
    
<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->

Here, head.misc is included which means that SCRIPT, STYLE, META, LINK 
and OBJECT are
allowed subelements for HEAD. But by doing this inclusion, they will 
also be allowed
subelements for TITLE, which is why they later are excluded.

 > If it is necessary, why is it not also necessary to forbid all other
 > elements besides those in %head.misc;

They are not allowed in the first place. The content model for TITLE is 
(#PCDATA).

 > As far as I have been able to discover, PCDATA may contain character
 > references such as &lt; but no tag-based markup such as <EM>...</EM>;
 > which is consistent with -(%head.misc;) being unnecessary.

Yes, in PCDATA, all markup is recognized, but elements are not allowed.
About the exclusion of head.misc being unnecessary, that is already 
answered :)

-- 
David Håsäther
Received on Friday, 6 May 2005 18:25:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:54 GMT