Re: [selectors4] Proposal for extending Selectors Level 4 with possibility to select attributes

On 10.11.2013 23:52, Simon Sapin wrote:
> You’re proposing to add something to the Selectors spec to select
> attributes, with the intent to user Selector API in JavaScript
> implementations of ITS.
> 
> I’m pointing out that changing the Selectors spec is not enough, you
> would need to get the DOM spec changed as well to somehow get attributes
> (rather than just elements) out of Selector API.

Well if change has to be done to DOM as well, then let's work on it once
we there is agreement that selectors should support returning other
nodes then elements.

It might prove that for other reasons like backward compatibility or
performance changing DOM is not the best option. Still there are ways
how to go around this limitation. For example creating two levels of
selectors let's say Basic and Extended. Basic selectors will be able to
select only elements (current status) and Extended will be able to
select all various kind of DOM nodes (including attributes, comments,
...) and additional methods in Selectors API could be introduced for
them in order to keep current type signatures for existing qSA() family
of methods.

> As to the ITS syntax that drives this JavaScript implementation, I
> suggested in an earlier email that the attribute name could be specified
> separately from the (element) selector.

And I have tried to explain why this is not an option.

     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 00:57:50 UTC