[whatwg] id and xml:id

On Apr 2, 2006, at 15:09, Anne van Kesteren wrote:

> Quoting Henri Sivonen <hsivonen at iki.fi>:
>> Also, I suggest requiring that elements must not have both id and
>> xml:id and requiring that xml:id must not occur in the HTML
>> serialization. (Again, from the document conformance point of view--
>> not disputing requirements on browsers.)
>
> How could it occur in a HTML document?

I meant having <foo xml:id='bar'> in the serialization.

>> Finally, as the ultimate ID nitpicking, the spec should state that it
>>  is naughty of authors to turn attributes other than id and xml:id
>> into IDs via the DTD. (Well, using a DTD at all is naughty. :-)
>
> But through DOM methods is ok?

I guess if such DOM functionality is interoperable.

>> Test case: http://hsivonen.iki.fi/test/wa10/adhoc/id.html

> Do you have a similar test for xml:id?

I now have:
http://hsivonen.iki.fi/test/wa10/adhoc/xml-id.xhtml
and id in XHTML:
http://hsivonen.iki.fi/test/wa10/adhoc/id.xhtml

The results are unexpected and interesting.

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-us; rv:1.9a1)  
Gecko/20060411 Firefox/3.0a1

http://hsivonen.iki.fi/test/wa10/adhoc/id.html

id='a' PASS
id='2' PASS
id='&lt;' PASS
id=',' PASS
id='&auml;' PASS
id=' c ' FAIL
id='\nd\n' PASS
id='\t\te\t\t' PASS
id='&#13;f&#13;' PASS

http://hsivonen.iki.fi/test/wa10/adhoc/id.xhtml

id='a' PASS
id='2' PASS
id='&lt;' PASS
id=',' PASS
id='&#x00e4;' PASS
id=' c ' FAIL
id='\nd\n' FAIL
id='\t\te\t\t' FAIL
id='&#13;f&#13;' FAIL

http://hsivonen.iki.fi/test/wa10/adhoc/xml-id.xhtml

xml:id='a' FAIL
xml:id='2' FAIL
xml:id='&lt;' FAIL
xml:id=',' FAIL
xml:id='&#x00e4;' FAIL
xml:id=' c ' FAIL
xml:id='\nd\n' FAIL
xml:id='\t\te\t\t' FAIL
xml:id='&#13;f&#13;' FAIL

Opera 9 build 3312 (OS X)

http://hsivonen.iki.fi/test/wa10/adhoc/id.html

id='a' PASS
id='2' PASS
id='&lt;' PASS
id=',' PASS
id='&auml;' PASS
id=' c ' FAIL
id='\nd\n' PASS
id='\t\te\t\t' PASS
id='&#13;f&#13;' FAIL

http://hsivonen.iki.fi/test/wa10/adhoc/id.xhtml

id='a' PASS
id='2' PASS
id='&lt;' PASS
id=',' PASS
id='&#x00e4;' PASS
id=' c ' FAIL
id='\nd\n' FAIL
id='\t\te\t\t' FAIL
id='&#13;f&#13;' PASS

http://hsivonen.iki.fi/test/wa10/adhoc/xml-id.xhtml

xml:id='a' PASS
xml:id='2' PASS
xml:id='&lt;' PASS
xml:id=',' PASS
xml:id='&#x00e4;' PASS
xml:id=' c ' PASS
xml:id='\nd\n' PASS
xml:id='\t\te\t\t' PASS
xml:id='&#13;f&#13;' PASS

WebKit-SVN-r13820

http://hsivonen.iki.fi/test/wa10/adhoc/id.html

id='a' PASS
id='2' PASS
id='&lt;' PASS
id=',' PASS
id='&auml;' PASS
id=' c ' FAIL
id='\nd\n' FAIL
id='\t\te\t\t' FAIL
id='&#13;f&#13;' FAIL

http://hsivonen.iki.fi/test/wa10/adhoc/id.xhtml

id='a' PASS
id='2' PASS
id='&lt;' PASS
id=',' PASS
id='&#x00e4;' PASS
id=' c ' FAIL
id='\nd\n' FAIL
id='\t\te\t\t' FAIL
id='&#13;f&#13;' FAIL

http://hsivonen.iki.fi/test/wa10/adhoc/xml-id.xhtml

xml:id='a' FAIL
xml:id='2' FAIL
xml:id='&lt;' FAIL
xml:id=',' FAIL
xml:id='&#x00e4;' FAIL
xml:id=' c ' FAIL
xml:id='\nd\n' FAIL
xml:id='\t\te\t\t' FAIL
xml:id='&#13;f&#13;' FAIL

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/

Received on Wednesday, 12 April 2006 04:26:36 UTC