httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34519] Directory index should emit valid XHTML
Date Mon, 06 Dec 2010 22:10:50 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=34519

Christoph Anton Mitterer <calestyo@scientia.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |calestyo@scientia.net

--- Comment #13 from Christoph Anton Mitterer <calestyo@scientia.net> 2010-12-06 17:10:45
EST ---
I validated a simply directory index from my Debian sid's 2.2.16 server... and
it only gives me some warnings (missing charset).

May I suggest the following:
1) Add XML header:
<?xml version="1.1" encoding="UTF-8"?>

This should solve the warnings. Of course, encoding should be dependant on the
IndexOptions Charset= value.


2) Switch to XHTML 1.1:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

As the name says XHTML 1.0 was always meant to be "transitional" and any
browser that can parse that is also able to parse XHTML 1.1 (which is like the
strict variant".
btw: My test-index already validated with XHTML 1.0


3) Add xml:lang
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

Not sure if this is mandatory in the meantime, but it's good behaviour I guess.
Is the content generated by mod_autoindex (I mean the headers) always English?



So this boils down to:
Use the following header instead of the current one:
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">


(I personally wouldn't place a newline in the middle of the DOCTYPE definition,
it's not required or suggested by the standards, so no reason for doing so).


Cheers,
Chris

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message