Re: [selectors-nonelement] First draft of a new spec for selecting non-element nodes

On Mon, Feb 17, 2014 at 1:04 AM, Jirka Kosek <jirka@kosek.cz> wrote:
> On 16.2.2014 20:32, Andrew Fedoniouk wrote:
>> ? If "yes" then what conceptually stops you from either this
>>
>>  <translateRule selector="abbr" attr="title" translate="no"/>
>
> See:
>
> http://lists.w3.org/Archives/Public/www-style/2013Nov/0121.html
>
>> or this custom form:
>>
>> <translateRule selector="abbr{title}" translate="no"/>
>>
>> '{' will never be part of selectors so you can safely use it
>> as a delimiter in domain specific query language that
>> includes CSS selectors as a subset of its grammar.
>
> What's point of inventing new syntax which will not be understand by
> common libraries for parsing and evaluating selectors, will not be known
> to authors?
>

Many frameworks/applications use CSS and selectors as a base
without adding their additions to core syntax. Examples: jquery and
derivatives, SASS and LESS, etc.

If your goal is to extend core of CSS selectors for one particular
use case/application then that's one story (A).

If the goal is to provide XPath alternative based on CSS selectors
grammar then this is another story (B).

If the goal is to provide some universal DOM query language
derived from CSS selectors syntax then it should be expressed
clearly in that specification.

In this case the specification even at this stage should contain
at least notions of the following:

1. selection of one or several attribute nodes.
2. selection of --"-- text nodes.
3. selection of --"-- comment nodes.

Just to get better idea of the spec purpose.

My pardon but as for now the spec looks like an attempt
to solve (A) task for one particular use case - selecting single attribute.


-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Monday, 17 February 2014 18:30:55 UTC