Re: ISSUE-4: Versioning, namespace URIs and MIME types

Hi Ian,

On Feb 16, 2009, at 9:35 PM, Ian Hickson wrote:

>
> Given the following function in a script:
>
>   function test(imp) {
>     // imp is a DOMImplementation object
>     var doc = imp.createDocument(null, null, null);
>     var e = doc.createElementNS('http://www.w3.org/1999/xhtml',  
> 'img');
>     return e;
>   }
>
> ...browsers are required, for compatibility with legacy content,  
> XHTML1,
> DOM2 HTML, and DOM2 Core, to return an element that, when inserted  
> into a
> document, displays either an image as indicated by its "src"  
> attribute, or
> text as indicated by its "alt" attribute.

But that element has neither value set. I'm not following your example.

> This is the case regardless of HTML5 or XHTML5 -- this has absolutely
> nothing to do with this working group, it is based purely on specs  
> that
> were created in the late 90s, around a decade ago, years before HTML5
> started. This is the world in which we find ourselves, writing HTML5.
>
> A spec that changes the requirements around this script in a way  
> that is
> incompatible with existing browsers, content, and specs is going to  
> have a
> great deal of trouble getting implemented by Web browsers. Thus, we  
> really
> have very little room to manoeuver here -- HTML5 is constrained  
> here, like
> in so many other places.
>
> Assuming that XHTML2 uses the same namespace as XHTML1, as has been
> suggested though not specified, XHTML2 requires behaviour of the <img>
> element created by the script above that is not compatible with  
> existing
> browsers, content, and specs (sections 18.1 and 20.1). XHTML claims
> (section 1.1.2) that "strict element-wise backwards compatibility is  
> no
> longer necessary", and thus it exempts itself from the aforementioned
> constraints. That isn't a problem, except insofar as it means that  
> no user
> agent can implement both XHTML2 and XHTML1 at the same time.

Could you say something about what XHTML2 would do with the above  
script? I'm not seeing anything in the chapters you cite that would  
imply different behavior for that script.  Perhaps you were thinking  
about a more elaborate script, but that would appear to me to do the  
same thing in either draft.

Take care,
Rob

Received on Tuesday, 17 February 2009 08:24:26 UTC