[whatwg] id and xml:id

Henri Sivonen hsivonen at iki.fi
Wed Apr 12 04:26:36 PDT 2006


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='<' PASS
id=',' PASS
id='ä' PASS
id=' c ' FAIL
id='\nd\n' PASS
id='\t\te\t\t' PASS
id='
f
' PASS

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

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

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

xml:id='a' FAIL
xml:id='2' FAIL
xml:id='<' 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='
f
' FAIL

Opera 9 build 3312 (OS X)

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

id='a' PASS
id='2' PASS
id='<' PASS
id=',' PASS
id='ä' PASS
id=' c ' FAIL
id='\nd\n' PASS
id='\t\te\t\t' PASS
id='
f
' FAIL

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

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

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

xml:id='a' PASS
xml:id='2' PASS
xml:id='<' 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='
f
' PASS

WebKit-SVN-r13820

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

id='a' PASS
id='2' PASS
id='<' PASS
id=',' PASS
id='ä' PASS
id=' c ' FAIL
id='\nd\n' FAIL
id='\t\te\t\t' FAIL
id='
f
' FAIL

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

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

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

xml:id='a' FAIL
xml:id='2' FAIL
xml:id='<' 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='
f
' FAIL

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





More information about the whatwg mailing list