W3C home > Mailing lists > Public > www-style@w3.org > March 2008

selection based on DOM Level 3 userData

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Tue, 04 Mar 2008 15:03:30 +0100
Message-ID: <47CD56B2.60100@disruptive-innovations.com>
To: "www-style@w3.org" <www-style@w3.org>
Cc: Laurent Jouanneau <laurent.jouanneau@disruptive-innovations.com>

Hi there,

We came up here with a few cases where we'd love to be able to
select elements based on the userData attached to an element [1].
Of course, this would make sense in CSS only for types that can
be casted into a string. Such a selector makes sense because it
allows to select elements based on data not present in the document
tree. In other terms, and if you have my editor background in mind,
this could allow to dynamically style a document without changing
anything in the document tree... VERY useful when you have to
serialize that tree from time to time...

We have two different suggestions:

1. use a new functional pseudo-notation with tests


2. or reuse the attribute selector notation (preferred)


    in that case, the backwards-compatible parsing is not a problem
    since the tokenizer will detect a FUNCTION that is normally illegal
    here in attribute selectors. I find this one rather cool, because it
    reuses the attribute selectors that people start to use, it's
    backwards compatible, and it will allow implementors to reuse the
    string matching codes they already implemented for attribute


Received on Tuesday, 4 March 2008 14:03:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:34 UTC