This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Nowadays CSS selectors are the standard way to query for some HTML elements, because these selectors are much shorter than XPath expressions, e.g. span#color div.red for ( element-with-id("blue")[name() = "span"]//div[tokenize(@class) = "red"] ). The alternative using contains-token ( element-with-id("blue")[name() = "span"]//div[contains-token(@class, "red")] ) is even longer. Thus for HTML a function fn:css($selector as string) that evaluates a CSS selector on the descendants of the context item would be more useful, e.g. css("span#color div.red")