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

Robert J Burns wrote:
> I understand from the short example. And I also understand the longer 
> example you provide. The scripting is simply a distraction. If the 
> author is authoring to HTML5 then the author would not append child 
> elements to the img element. So now you're producing invalid HTML5. If 
> the author is producing XHTML2, then the author would not provide an alt 
> attribute.  So you're also producing invalid XHTML2.

I don't think the scripting is a distraction at all.  The key here is 
that once the <img> element has been created the script wants to show an 
image to the user using that element.  The script that creates the 
element and the script doing the showing need not be the same script, or 
authored by the same person (e.g. the script doing the showing is a 
library that does general image-showing stuff amongst other things; 
consumers pass in nodes to show the images in).  The script doing the 
showing wants to provide fallback content.  How is it supposed to do it?

If the script can examine the node it's working with and determine from 
that how it should show fallback content, that's ideal.  If it can't, we 
have a problem.

I suppose the library API could include a flag for "what kind of html 
image are you actually giving me", but that seems like an unfortunate 
artifact to foist off on script authors.  It also seems like something 
people are likely to either forget or to get wrong, assuming both HTML5 
and XHTML2 are actually in use.

> However, the context provides all the information necessary to know how 
> to process the document in the situation of a fully conforming document. 

While true in this particular case, the concern I have is being unable 
to produce a conforming document even if you want to, if you're doing it 
via the DOM.

-Boris

Received on Wednesday, 18 February 2009 16:40:56 UTC