ISSUE-230: OBJECTS_AND_SCRIPTS needs to address <object> with multiple children [mobileOK Basic tests]

ISSUE-230: OBJECTS_AND_SCRIPTS needs to address <object> with multiple children [mobileOK Basic tests]

http://www.w3.org/2005/MWI/BPWG/Group/track/issues/

Raised by: Dominique Hazaƫl-Massieux
On product: mobileOK Basic tests

Dom notes that the spec assumes that <object> contains at most one child, when that is not true. This is legal:

<object data="foo" type="video/mpeg">
 <object data="bar" type="image/png"></object>
 <object data="baz" type="image/gif"></object>
 <img src="foobar" />
 Hello
</object>

I (Sean) suggested the following rewrite to the test:

Call an object element "usable" if and only if
- Its data attribute refers to a supported image type, OR
- It is empty (but this generates a warning), OR
- Its children are all either
 - text nodes not consisting entirely of whitespace
 - img elements referring to a supported image type
 - "usable" object elements

.... and then the test is merely, for each <object> (that's not a child of an <object>), FAIL if it is not "usable"

Received on Thursday, 17 January 2008 22:03:47 UTC