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

Re: How to tell if a web server is running Apache?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 31 May 2001 13:46:00 +0300 (EET DST)
Message-Id: <200105311046.NAA07310@melvin.eunet.fi>
To: www-html-editor@w3.org
In article news:thc03dd1qfaiac@corp.supernews.co.uk in alt.html,
"David Aldred" <david@extrobe.com> wrote:

> <!DOCTYPE html PUBLIC
> "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>
> <head>
> <title>test page</title>
> </head>
> <body>
> <p align="justify">
> this text is justified. Lets see if W3 will validate it.
> </p>
> </body>
> </html>

Oh my... sorry, I had not imagined that the XHTML DTDs actually deviate 
from HTML 4 DTDs in a manner that conflicts with the prose of XHTML 
specifications (which say that the only changes made are due to XMLization, 
to put it simply).

> Line 9, column 17:
>   <p align="justify">
>                    ^
> Error: value of attribute "align" cannot be "justify"; must be one of
> "left", "center", "right"

The message itself is very clear.

> I mean, if you see something wrong which is causing it, I would love to
> know about it, as I did regualry justify chunks of text, but see no
> errors in the code which can be causing it.

The error is in the XHTML DTDs (both in Transitional and Frameset - not in 
Strict of course since it lacks the align attribute there, as in HTML 4 
Strict):

<!ENTITY % TextAlign "align (left|center|right) #IMPLIED">

<!ELEMENT p %Inline;>
<!ATTLIST p
  %attrs;
  %TextAlign;
  >

in http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

versus

<!ENTITY % align "align (left|center|right|justify)  #IMPLIED"
                   -- default is left for ltr paragraphs, right for rtl --
  >

<!ELEMENT P - O (%inline;)*            -- paragraph -->
<!ATTLIST P
  %attrs;                              -- %coreattrs, %i18n, %events --
  %align;                              -- align, text alignment --
  >

in http://www.w3.org/TR/html4/sgml/loosedtd.html

(and respectively for Frameset DTDs).

This definitely means that <p align="justify"> is valid in HTML 4.01 
Transitional, invalid in XHTML 1.0 Transitional. According to the prose of 
XHTML 1.0 specification, such a discrepancy should not exist.

(In practice, if you use the attribute, you could just decide to ignore the 
validator error message(s), or you might create a modified DTD if such 
messages disturb too much.)

I'm sending this also by E-mail to the error reporting address mentioned in 
the XHTML specification.

-- 
Yucca, http://www.malibutelecom.com/yucca/
 alias http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.malibutelecom.com/yucca/www.html
Received on Thursday, 31 May 2001 06:46:09 GMT

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