[Pmwiki-users] Wiki HTML validation issues

Patrick R. Michaud pmichaud
Sun Mar 14 09:55:58 CST 2004


On Sat, Mar 13, 2004 at 08:21:08PM -0900, Chris Lott wrote:
> >>> IMO, the problems with the trailing slashes in the <link ... /> and 
> <meta ... />
> >>> tags are bugs in the validator.
> 
> Well, closing of "empty" elements using an abbreviated close is not 
> 'valid' html according to the specification, so it isn't a bug, though 
> it scarcely matters. 

I agree that abbreviated close isn't technically 'valid' HTML, but
on the other hand the validator accepts the abbreviated close in other
tags (e.g. <br /> and <hr />).  The validator ought to at least be
consistent.

> More important, I think, is to stick to using the 
> proper tag set for the document type declaration. So if HTML is the 
> doctype, use HTML tag conventions, otherwise use XHTML.

I'd do this but it seems more trouble than it's worth to get PmWiki
to switch between the two conventions.  So I'll just stick with XHTML.

> If you look at: http://www.hut.fi/u/hsivonen/doctype.html you will 
> notice that your document declaration has exactly the same properties 
> (in terms of putting browsers into standards vs quirks mode) as using 
> XHTML 1.0 Transitional without an XML declaration... 

Indeed--I think the problem I was having before was the existence of
<?xml ... ?> in the output triggering quirks mode, and not the XHTML
doctype.  At any rate, based on the reference you provided above I'm 
probably going to change the DOCTYPE in pmwiki.tmpl to be XHTML 
Transitional and leave it at that unless it causes problems in browsers.

As an aside, I just now noticed that for many versions (at least as far
back as 0.4.0) PmWiki has been using "http://www.w3.org/TR/html40/loose.dtd"
instead of "http://www.w3.org/TR/html4/loose.dtd" in the DOCTYPE.
I'm not sure where I got the "html40" reference comes from, but the 
HTML 4.01 spec uses the latter.  (And now that I'm switching to XHTML
Transitional the variance no longer matters. :-)

Pm



More information about the pmwiki-users mailing list