W3C home > Mailing lists > Public > www-style@w3.org > February 2014

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

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Mon, 17 Feb 2014 10:30:27 -0800
Message-ID: <CALRQH7_3bPae3fk706+Uv0VMs+_Mi2LxuxRfWL88ShUk6pajzQ@mail.gmail.com>
To: Jirka Kosek <jirka@kosek.cz>
Cc: Brad Kemper <brad.kemper@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC