- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Mon, 01 Sep 2003 04:06:47 +0200
- To: fantasai <fantasai@escape.com>
- Cc: www-style@w3.org
* fantasai wrote: >Matt wrote: >> What if I have an element like this: >> <a href="?alpha=200&beta=300">blah</a> >> >> Which of these selectors should match it? >> >> a[href*="alpha=200&beta=300"] >> a[href*="alpha=200&beta=300"] >> >> i.e. Does the CSS selector match the HTML entity, or its replaced character? > >The replaced character. Entity replacement is done during >parsing, and CSS doesn't care what happens at that stage >of document processing. Not quite. CSS does not specify how user agents must process documents. For example, a conforming user agent does not have to resolve external entities in a XML document; as entity declarations are typically stored inside external entities, a user agent might not have read the declaration for the entity [1]. Matching is undefined in this case. It could be up to the document language to define this, but XML for example does not specify the string value of attribute values... This is probably worse for :contains() where the Candiate Recommendation says The textual contents of a given element is determined by the concatenation of all PCDATA contained in the element and sub-elements. but neither the specification nor any of it's references define the term "PCDATA" and even if you translate it to the #PCDATA keyword in XML 1.0 you do not have an answer whether this considers entity references if replacement text is available/not available. [1] of course, this does not apply to e.g. & in XML documents as XML processors are required to recognize them without declaration
Received on Sunday, 31 August 2003 22:07:11 UTC