Re: ITS 2.0, Selectors 4 and Selectors API 2

On 3.7.2013 14:13, Jirka Kosek wrote:
>> b. Selectors cannot target attributes
> 
> Indeed, this is very serious limitation of CSS selectors and we even
> discussed removing CSS selectors completely from ITS because of this.
> But at the end prevailing opinion was that CSS selectors will be useful
> for scenarios where there is no need to care about attributes. But
> without ability so select attributes some users will be forced to switch
> to XPath instead of CSS selectors.

Today CSS WG agreed to extend selectors to support access to attributes
using ::attr() syntax. I have to write first draft. In practice this
will allow to write the following XPath

//a/@title

alternatively using CSS selectors as

a::attr(title)

Another still open question is how to support this in Selectors API as
recent changes in DOM make it even harder to treat attributes as nodes
similarly to elements.

I will keep you informed about progress as ITS is main use-case for this
selectors extension.

    Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------

Received on Monday, 11 November 2013 08:33:09 UTC