Bug 164687

Summary: Syntax Errors on fedora.redhat.com.
Product: [Retired] Fedora Infrastructure Reporter: Terje Bless <link>
Component: websiteAssignee: Greg DeKoenigsberg <gdk>
Status: CLOSED CURRENTRELEASE QA Contact: Elliot Lee <sopwith>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: nman64, sopwith
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://validator.w3.org/check?uri=http://fedora.redhat.com/
Whiteboard:
Fixed In Version: 20051115 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-15 23:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Terje Bless 2005-07-30 09:45:38 UTC
The markup on <http://fedora.red.hat.com/> has several syntax errors
(cf. the URL field).

The code for the navigation menu tries to embed an UL inside a P -- 
which isn't allowed; P cannot contain block level elements such as UL --
and the second news item contains a botched end tag for the STRONG element
('<strong') which, while technically valid SGML, isn't supported by UAs.

There are also several uses of physical markup -- such as HR and BR --
which is unfortunate. The markup for news items should probably be changed
to something like:

[[[
  <div class="newsitem">
    <h2>Fedora Core 4 Available!</h2>
    <p>[â¦contentâ¦]</p>
  </div>
]]]

Comment 1 Patrick Barnes 2005-11-15 21:17:45 UTC
I've corrected the navigation menu to use a <div> element instead of a <p>
element.  While both of these elements are block-level elements, the <p> element
should not contain other block-level elements.  The <div> element can.

http://www.w3.org/TR/html4/struct/text.html#h-9.3.1
http://www.w3.org/TR/html4/struct/global.html#h-7.5.4

The <strong> closing tag has been fixed, I've also ensured that the other tags
match case, and added embedded closing tags to some of the includes (eg. <img
... />) that put the code more inline to newer standards.

I have not changed the structure of anything, nor will I at this time.  I have
left the <hr> and <br> tags as they are.  Restructuring doesn't seem logical
considering the plans currently in place for fedora.redhat.com.

I'm closing this bug as CURRENTRELEASE.  Standards compliance is an ongoing
effort that we should pay attention to as we move forward.  Thank you for your
vigilance.

Comment 2 Terje Bless 2005-11-15 21:58:43 UTC
(In reply to comment #1)
> [I've] added embedded closing tags to some of the includes (eg. <img
> ... />) that put the code more inline to newer standards.

Unfortunately, that construct is incorrect in HTML 4.01 so this actually
introduces new syntax errors.


The "meta" (and "link", for that matter) element is defined in the DTD as

[[[
  <!ELEMENT META - O EMPTY               -- generic metainformation -->
]]]

which means the element has its "declared content" set to "EMPTY" and
thus the end tag (even a minimized one) must be omitted.

Comment 3 Patrick Barnes 2005-11-15 22:18:47 UTC
If we are going to keep the infrastructure for fedora.redhat.com as it currently
is, then it would be nice to migrate it to XHTML (where the closing tags would
be required).  You are correct that it is not technically accurate to use
closing tags with HTML 4.01.  I will keep this issue in mind for the near
future, and I will bring everything in line with one or the other once the fate
of fedora.redhat.com is decided.  Either direction still needs a bit of work. 
Although removing the closing tags would allow the front page of the site to
validate using the W3C's SGML validator, there are other issues elsewhere in the
site and beyond the validator's detection that could also use some love.

Comment 4 Terje Bless 2005-11-15 22:39:22 UTC
For several reasons, some of which are enumerated or alluded to here
<http://www.hixie.ch/advocacy/xhtml>, I would strongly suggest avoiding
XHTML for the time being.

Comment 5 Patrick Barnes 2005-11-15 23:21:20 UTC
I acknowledge that mixing standards to make things work right invalidates their
initial purpose.  We have the capability to use XHTML properly, and I think we
should prepare ourselves to use it.  Whether or not we should make this change
now or later is a subject that could spark significant debate.  I will agree
that my placement of the closing tags in a document using the HTML DTD and
mimetype was not correct by standards, I'm just really more interested in the
best long-term solution than with nitpicking against the current, stale site.

Overall, I think the best solution for the site is to abstract content from
structure as much as possible.  The Documentation Project already achieves this
using DocBook.  Use of XML and related technologies on the server side,
intelligent scripting, and careful attention to standards would provide us with
a powerful and versatile solution.  I would certainly go along with the use of
scripting to parse XML data (our content) and, based upon the HTTP request
header, send the output as one of HTML, XHTML, or XML, as appropriate.  If we
abstract the content in this matter, it also becomes easy to use other formats
as well.

Either way we go, I don't want to devote too much time or too many resources to
fedora.redhat.com until its fate is decided.


Comment 6 Patrick Barnes 2005-11-15 23:38:43 UTC
Alright, I've made sufficient changes for the page to validate.  This will
suffice until any larger venture begins.

I'm once again closing this bug.  Any further issues with standards compliance
should be discussed at fedora-websites-list.