Subject: | Whitespace issue with external id and internal subset |
Cf. http://www.w3.org/mid/eavf10.3tg.1%40mail.christoph.schneegans.de
Christoph Schneegans reported that the W3C Markup Validator fails to
find a doctype from a declaration where an internal subset immediately
(ie. no whitespace) follows an external ID:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>
Indeed, the validator uses HTML::Parser for finding the doctype, but the
parser never reports the declaration event with the above. The issue
seems to be triggered by lack of whitespace between the last " and [;
with the following, the declaration event does happen as expected:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" []>
Per the XML recommendation, whitespace is not required between external
ID and internal subset, see http://www.w3.org/TR/REC-xml/#NT-doctypedecl