W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

RE: tidy4aug00 update

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Mon, 7 Aug 2000 15:26:26 -0400
To: <html-tidy@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBGENDDLAA.jelks@jelks.nu>
Sebastian Lange wrote:

> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> It is always 2 lines, never one, and always indented by 4 spaces.

The above style is the most often used.  There's nothing that says the whole
DOCTYPE declaration has to go on one line (I personally find it easier to read
if it doesn't).

> I believe there should be written "SYSTEM" before the DTD URL, am I wrong?

The XML 1.0 BNF[1] says:

      [28]  doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S?
                        <!-- some stuff omitted for clarity -->

      [75]  ExternalID ::= 'SYSTEM' S SystemLiteral |
                           'PUBLIC' S PubidLiteral S SystemLiteral

So use the SYSTEM keyword only if there is no PUBLIC keyword:

	<!DOCTYPE foo PUBLIC "some FPI" "http://someSystemURI">
	<!DOCTYPE foo SYSTEM "http://someSystemURI">

> And besides that, the URL can be omitted, as is the case with all other
> DOCTYPE identifiers written by tidy.

Not in XHTML, because XML *requires* a SYSTEM identifier (see production rule
#75 above).


/Jelks


[1] I found it tiresome navigating around the BNF inside the XML 1.0
Recommendation, so I extracted just the BNF here:

	http://cpcug.org/user/jelks/XML/xmlebnf.html
Received on Monday, 7 August 2000 15:29:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT