W3C home > Mailing lists > Public > www-html@w3.org > January 2003

Re: HTML DTD

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Tue, 14 Jan 2003 23:21:26 +0900 (JST)
Message-Id: <20030114.232126.28801682.mimasa@w3.org>
To: okeeffda@tcd.ie
Cc: www-html@w3.org

"Dervla O'Keeffe" <okeeffda@tcd.ie> wrote:

> I am currently using Xerces DOM parser (org.apache.xerces.parsrs.DOMParser) to 
> try and parse HTML by using the transitional HTML 4.01 DTD as an external DTD 
> with an input xml (html) file, as per DTD on the W3 subsite at:
> 
>  http://www.w3.org/TR/REC-html40/loose.dtd
> (I am aware that HTML is not XML, which is why I am using the DTD.)

Since HTML is not XML, it is not appropriate to use an XML parser to
parse the HTML 4 DTD.

> I do not understand the following line of the DTD:
> 
>  <!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>

This syntax is allowed in SGML but not in XML, that's why Xerces complained.

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Tuesday, 14 January 2003 09:21:28 GMT

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