- From: Patrick Wright <pdoubleya@gmail.com>
- Date: Thu, 29 Dec 2005 16:58:30 +0100
- To: www-style@w3.org
Hi (Sorry, Elliot, accidentally mailed to just you) > I suggest two things: > > 1. Weaken the first paragraph to make it clear that there is no > guarantee that IDs are unique, even if they're supposed to be. ...or rather, there is no guarrantee of uniqueness for invalid documents, or for un-validated documents. > > 2. Specify what happens when multiple elements share the same ID. I > would prefer the style rule to be applied to both such elements. > However, you could logically choose it to apply to only the first. I > would prefer this behavior not to be undefined. Undefined is bad. For the Flying Saucer renderer, it's one of our to-dos to handle optimize element style attributes, and one way to do that is, on parsing the XML, to create a virtual selector on the element ID (generating an ID if none was assigned). So I myself have been relying on the uniqueness of IDs for that reason, and hadn't thought about invalid documents in this case. Maybe an alternative is--if the document has not been validated, or is invalid, the UA may decide to a) ignore all ID selectors b) ignore all ID selectors on duplicate IDs (potentially more costly) c) apply styling only to "first" matching ID selector (in which order?) Regards Patrick
Received on Thursday, 29 December 2005 16:05:37 UTC