You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by David Legg <da...@searchevent.co.uk> on 2008/09/22 18:26:28 UTC

Should HTMLSerializer be more strict about strict 4.01 HTML?

In playing around with the HTML serializer I've noticed that the strict 
4.01 doctype doesn't actually prevent invalid output.  For example the 
'align' property in <IMG align="right" src="someimage.jpg"> is 
deprecated (because it is considered presentational) and fails the W3C 
validator if let through.

I'm wondering if maybe the serializer should silently correct this by 
leaving deprecated properties out.  I can't see any better way to fix 
this except by embedding styles in the output... but that seems 
horrible.  The other alternative of causing an exception seems equally 
oppressive but maybe it would help in the long run.

Any ideas?

David Legg