Re: [selectors4] first-child and last-child

On 19/11/2013 14:40, Daniel Glazman wrote:
> Section 12.5.3 of Selectors 4 reads:
>
>    The :first-child pseudo-class represents an element that precedes
>    all of its siblings
>
> and 12.5.4 reads:
>
>    The :last-child pseudo-class represents an element that follows all
>    of its siblings
>
> Since a sibling is well defined on node interface, I think we should
> s/siblings/element siblings/
>
> Same comment applies to most of 12.5, 12.6 and 12.7.


More generally, the Selectors spec should properly define the model of 
the document selectors are matched against.

The simplest is probably to just use the DOM, as it’s already defined.

If we instead want to keep Selectors independent of anything and define 
a special-purpose document model, something (CSS ?) we’ll also need to 
define the mapping with DOM, and clarify references to DOM node such as 
processing instructions in the definition of :empty

-- 
Simon Sapin

Received on Tuesday, 19 November 2013 16:03:57 UTC