Re: Is this legal XHTML 1.1?

Hello dear Elliotte, dear list members,


Am Sonntag, 8. Dezember 2002 19:52 schrieb Elliotte Rusty Harold:
> I've been playing around with XHTML 1.1 on Cafe con Leche today,
> mostly to see if I could get it to work. I made the usual changes
> from font tags and presentational attributes to CSS. I fixed a few
> malformedness errors that had snuck in. And I added some elements in
> places where XHTML required them.
>
> However, there were a few changes I just didn't feel comfortable
> making for reasons of backwards compatibility. For instance, I wanted
> to keep a language attribute on my script element and a width
> attribute on my td element. And I had a couple of custom elements I
> didn't feel like giving up, so I wrote an internal DTD subset that
> made the necessary adjustments:
>
> <!DOCTYPE
>   html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
>   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
>   <!ENTITY % Block.extra "| today | quoteoftheday">
>   <!ELEMENT quoteoftheday  (blockquote, p)>
>   <!ELEMENT today ( h1 | h2 | h3 | h4 | h5 | h6 | ul | ol | dl | p |
> div | pre | blockquote | address | hr | table | form | fieldset | br
>
> | span | em | strong | dfn | code | samp | kbd | var | cite | abbr |
>
> acronym | q | tt | i | b | big | small | sub | sup | bdo | a | img |
> map | applet | ruby | input | select | textarea | label | button |
> ins | del | script | noscript)* >
>   <!ATTLIST today
>      date CDATA #REQUIRED
>      id   ID    #REQUIRED >
> <!ATTLIST script language NMTOKEN #IMPLIED>
> <!ATTLIST td width NMTOKEN #IMPLIED>
> ]>
>
> Is this legal? The W3C XHTML validator seems to think it is. It
> passes the document <http://www.cafeconleche.org/index.xhtml> without
> complaint. Adding custom elements like today and quoteoftheday to
> XHTML 1.1 is certainly blessed through profiling. But I'm using the
> backdoor instead. And using the internal DTD subset to sneak
> deprecated and obsolete attributes back into the language feels very
> suspicious.
>
> Thoughts? Comments?

I think this is completely legal.
But I think it would be completely illegal for a user agent accepting the 
document as Content-Type: application/xhtml+xml to fall back to previous 
semantics of those elements and attributes.
The elements and attributes must not trigger any special behaviour in the user 
agent unless specified in a stylesheet or a similar way.

I also think that this must not be abused to create a mixture of new / kept 
XHTML semantics and deprecated HTML semantics.
I'd recommend tagging mixture of XHTML and HTML that way deprecated.
And I'd recommend adding a test suite for XHTML browsers that ensures they do 
not fall back to deprecated HTML in any way when the document is correctly 
served as application/xhtml+xml.

That's only my first thoughts on this, might be shot down, it's just my 2 
cents.

By the way, I'm curious, what the width and language attribute for? What 
browsers require them?


Bye
-- 
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/

Received on Sunday, 8 December 2002 15:09:51 UTC