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

Re: Guidelines on DTD declaration

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Tue, 20 Apr 2004 15:09:42 +0900 (JST)
Message-Id: <20040420.150942.104649163.mimasa@w3.org>
To: eswaraprasadhkr@hotmail.com
Cc: www-html-editor@w3.org

"Eswara Prasadh" <eswaraprasadhkr@hotmail.com> wrote:

>  I encounter the following error when trying to do xml transformation 
>   The declaration for the entity "HTML.Version" must end with '>'. I am
> trying to troubleshoot this way. Guess its to do with the declaration.

An HTML 4.01 document is an SGML document and not an XML document, so
if you use an XML tool to transform that HTML document, it is unlikely
to work.  In this particular case SGML allows comments inside an entity 
declaration, but XML does not.  You'd have to convert your HTML 4.01
documents into XHTML 1.0 documents, e.g. by using HTML Tidy, before
doing XML transformation.

> Is it mandatory to declare this way?
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/loose.dtd"> 
>  or is it ok to declare this way [to avoid the above said error.]
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd"> 

I'm afraid I cannot find the difference between the above two.

Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Tuesday, 20 April 2004 02:09:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:52 UTC