W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2006

[whatwg] id and xml:id

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 12 Apr 2006 14:26:36 +0300
Message-ID: <900C7D70-754B-408E-89AD-23E1CBD0A3F0@iki.fi>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:46 UTC