3
votes

Following declaration appears in html 4.01 dtds

<!ELEMENT STYLE - - %StyleSheet        -- style info -->

(see http://www.w3.org/TR/REC-html40/sgml/dtd.html it's in both strict.dtd and loose.dtd)

Apparently, the ; is missing after %StyleSheet. The reference should have been %StyleSheet;

But this is the official dtd of the holy html - by far the most important dtd of all dtds - so what's going on there? Is it valid entity reference like that?

1
I'm sorry to disappoint you, but DTDs are irrelevant. - Ms2ger
As was your comment :) - icedwater

1 Answers

4
votes

It is valid without the semicolon in HTML 4.01 DTDs. Here's an extract from the W3C's HTML 4.01 Specification - On SGML and HTML:

... Instances of parameter entities in a DTD begin with "%", then the parameter entity name, and terminated by an optional ";".

In an XHTML DTD it wouldn't be valid; they follow this recommendation (because XHTML is XML): Extensible Markup Language (XML) 1.0 (Fifth Edition) - Character and Entity References:

... Definition: Parameter-entity references use percent-sign (%) and semicolon (;) as delimiters.