The livedocs.dojotoolkit.org/dojo/query docs talk about various
versions of dojo/query implementations (css, acme, etc.), but I don't
see any docs that explain the differences between the various
implementations. Does an explanation of the differences exist
somewhere?
-Chris

Search Discussions

  • Bill Keese at Dec 9, 2011 at 1:08 am
    It's a good question. Specifically about which selectors each engine
    supports. I didn't find any good documentation, but the data seems to be
    out there in bits and pieces.

    1) Acme

    The selectors are listed in
    http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308,
    although that doesn't show up well on our API site, perhaps because of the
    naming conflict with the new dojo/query module.

    Also on http://livedocs.dojotoolkit.org/dojo/query although perhaps that's
    not a comprehensive list.


    2) Lite

    There's a hint in http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245,
    which says:

    it
    is only supposed to do a simple CSS2 queries (#id, .class, tag and some
    [attributes]), roughly the same capability as Dustin Diaz's Qwery
    (https://github.com/ded/qwery))
    And then from lite.js:

    "^=": function(attrValue, value){
    return attrValue.indexOf(value) == 0;

    },

    "*=": function(attrValue, value){

    return attrValue.indexOf(value) > -1;

    },

    "$=": function(attrValue, value){

    return attrValue.substring(attrValue.length - value.length,
    attrValue.length) == value;
    },

    "~=": function(attrValue, value){

    return (' ' + attrValue + ' ').indexOf(' ' + value + ' ') > -1;

    },

    "|=": function(attrValue, value){

    return (attrValue + '-').indexOf(value + '-') == 0;

    },

    "=": function(attrValue, value){

    return attrValue == value;

    },

    "": function(attrValue, value){

    return true;

    }

    A thread about the engines is in
    http://thread.gmane.org/gmane.comp.web.dojo.devel/14203.


    3) sizzle

    I remember lots of performance charts for the various selectors back in the
    days of the acme/sizzle wars, but probably we don't need to document sizzle
    much anyway. Actually, looks like it's not even in our source tree
    anymore.

    On Wed, Dec 7, 2011 at 2:17 AM, Chris Mitchell wrote:

    The livedocs.dojotoolkit.org/dojo/query docs talk about various
    versions of dojo/query implementations (css, acme, etc.), but I don't
    see any docs that explain the differences between the various
    implementations. Does an explanation of the differences exist
    somewhere?
    -Chris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20111209/84b8fb80/attachment-0001.htm
  • Kris Zyp at Dec 9, 2011 at 10:39 am
    I updated the docs to more explicitly state the capabilities of the two
    selector engines, lite and acme. I am not sure if there is anything more
    that you are looking for. However, I was very intentional about focusing
    the API and the documentation towards having developers specifying CSS
    selector level required by a module, rather than tight coupling to a
    specific engine.
    Thanks,
    Kris
    On 12/8/2011 11:08 PM, Bill Keese wrote:
    It's a good question. Specifically about which selectors each engine
    supports. I didn't find any good documentation, but the data seems
    to be out there in bits and pieces.

    1) Acme

    The selectors are listed in
    http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308,
    although that doesn't show up well on our API site, perhaps because of
    the naming conflict with the new dojo/query module.

    Also on http://livedocs.dojotoolkit.org/dojo/query although perhaps
    that's not a comprehensive list.


    2) Lite

    There's a hint in
    http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245, which says:

    it
    is only supposed to do a simple CSS2 queries (#id, .class, tag and some
    [attributes]), roughly the same capability as Dustin Diaz's Qwery
    (https://github.com/ded/qwery))


    And then from lite.js:

    "^=": function(attrValue, value){

    return attrValue.indexOf(value) == 0;

    },

    "*=": function(attrValue, value){

    return attrValue.indexOf(value) > -1;

    },

    "$=": function(attrValue, value){

    return attrValue.substring(attrValue.length - value.length,
    attrValue.length) == value;

    },

    "~=": function(attrValue, value){

    return (' ' + attrValue + ' ').indexOf(' ' + value + ' ') > -1;

    },

    "|=": function(attrValue, value){

    return (attrValue + '-').indexOf(value + '-') == 0;

    },

    "=": function(attrValue, value){

    return attrValue == value;

    },

    "": function(attrValue, value){

    return true;

    }


    A thread about the engines is in
    http://thread.gmane.org/gmane.comp.web.dojo.devel/14203.


    3) sizzle

    I remember lots of performance charts for the various selectors back
    in the days of the acme/sizzle wars, but probably we don't need to
    document sizzle much anyway. Actually, looks like it's not even in
    our source tree anymore.


    On Wed, Dec 7, 2011 at 2:17 AM, Chris Mitchell
    <ccmitchellusa at gmail.com wrote:

    The livedocs.dojotoolkit.org/dojo/query
    <http://livedocs.dojotoolkit.org/dojo/query> docs talk about various
    versions of dojo/query implementations (css, acme, etc.), but I don't
    see any docs that explain the differences between the various
    implementations. Does an explanation of the differences exist
    somewhere?
    -Chris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20111209/21403ce0/attachment-0001.htm
  • Chris Mitchell at Dec 9, 2011 at 3:53 pm
    Thanks Kris, this is the info I was looking for.
    -Chris

    2011/12/9 Kris Zyp <kzyp at dojotoolkit.org>:
    I updated the docs to more explicitly state the capabilities of the two
    selector engines, lite and acme. I am not sure if there is anything more
    that you are looking for. However, I was very intentional about focusing the
    API and the documentation towards having developers specifying CSS selector
    level required by a module, rather than tight coupling to a specific engine.
    Thanks,
    Kris


    On 12/8/2011 11:08 PM, Bill Keese wrote:

    It's a good question. ? Specifically about which selectors each engine
    supports. ? I didn't find any good documentation, but the data seems to be
    out there in bits and pieces.

    1) Acme

    The selectors are listed
    in?http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308,
    although that doesn't show up well on our API site, perhaps because of the
    naming conflict with the new dojo/query module.

    Also on http://livedocs.dojotoolkit.org/dojo/query although perhaps that's
    not a comprehensive list.


    2) ?Lite

    There's a hint
    in?http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245, which says:
    it
    is only supposed to do a simple CSS2 queries (#id, .class, tag and some
    [attributes]), roughly the same capability as Dustin Diaz's Qwery
    (https://github.com/ded/qwery))

    And then from lite.js:
    "^=": function(attrValue, value){

    return attrValue.indexOf(value) == 0;

    },

    "*=": function(attrValue, value){

    return attrValue.indexOf(value) > -1;

    },

    "$=": function(attrValue, value){

    return attrValue.substring(attrValue.length - value.length,
    attrValue.length) == value;

    },

    "~=": function(attrValue, value){

    return (' ' + attrValue + ' ').indexOf(' ' + value + ' ') > -1;

    },

    "|=": function(attrValue, value){

    return (attrValue + '-').indexOf(value + '-') == 0;

    },

    "=": function(attrValue, value){

    return attrValue == value;

    },

    "": function(attrValue, value){

    return true;

    }
    A thread about the engines is in
    http://thread.gmane.org/gmane.comp.web.dojo.devel/14203.


    3) sizzle

    I remember lots of performance charts for the various selectors back in the
    days of the acme/sizzle wars, but probably we don't need to document sizzle
    much anyway. ? Actually, looks like it's not even in our source tree
    anymore.

    On Wed, Dec 7, 2011 at 2:17 AM, Chris Mitchell wrote:

    The livedocs.dojotoolkit.org/dojo/query docs talk about various
    versions of dojo/query implementations (css, acme, etc.), but I don't
    see any docs that explain the differences between the various
    implementations. ?Does an explanation of the differences exist
    somewhere?
    -Chris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Bill Keese at Dec 9, 2011 at 5:48 pm
    Explaining it via CSS selector level instead of engine name seems good, but
    the documentation doesn't really tell which selectors each CSS level
    supports.

    For CSS2 it just says:

    consisting of elemental selectors: .class, #id, tag, and star, attribute
    selectors, and child (>), descendant (space), and union (,) combinators

    That's vague to me, especially "attribute selectors".

    Earlier in the doc it lists the CSS three selectors (
    http://livedocs.dojotoolkit.org/dojo/query#standard-css3-selectors). How
    about breaking up that table into CSS2, CSS2.1, and CSS3?

    On Sat, Dec 10, 2011 at 12:39 AM, Kris Zyp wrote:

    I updated the docs to more explicitly state the capabilities of the two
    selector engines, lite and acme. I am not sure if there is anything more
    that you are looking for. However, I was very intentional about focusing
    the API and the documentation towards having developers specifying CSS
    selector level required by a module, rather than tight coupling to a
    specific engine.
    Thanks,
    Kris


    On 12/8/2011 11:08 PM, Bill Keese wrote:

    It's a good question. Specifically about which selectors each engine
    supports. I didn't find any good documentation, but the data seems to be
    out there in bits and pieces.

    1) Acme

    The selectors are listed in
    http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308
    ,
    although that doesn't show up well on our API site, perhaps because of the
    naming conflict with the new dojo/query module.

    Also on http://livedocs.dojotoolkit.org/dojo/query although perhaps
    that's not a comprehensive list.


    2) Lite

    There's a hint in
    http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245, which says:

    it
    is only supposed to do a simple CSS2 queries (#id, .class, tag and some
    [attributes]), roughly the same capability as Dustin Diaz's Qwery
    (https://github.com/ded/qwery))
    And then from lite.js:

    "^=": function(attrValue, value){
    return attrValue.indexOf(value) == 0;

    },

    "*=": function(attrValue, value){

    return attrValue.indexOf(value) > -1;

    },

    "$=": function(attrValue, value){

    return attrValue.substring(attrValue.length - value.length,
    attrValue.length) == value;
    },

    "~=": function(attrValue, value){

    return (' ' + attrValue + ' ').indexOf(' ' + value + ' ') > -1;

    },

    "|=": function(attrValue, value){

    return (attrValue + '-').indexOf(value + '-') == 0;

    },

    "=": function(attrValue, value){

    return attrValue == value;

    },

    "": function(attrValue, value){

    return true;

    }

    A thread about the engines is in
    http://thread.gmane.org/gmane.comp.web.dojo.devel/14203.


    3) sizzle

    I remember lots of performance charts for the various selectors back in
    the days of the acme/sizzle wars, but probably we don't need to document
    sizzle much anyway. Actually, looks like it's not even in our source tree
    anymore.

    On Wed, Dec 7, 2011 at 2:17 AM, Chris Mitchell wrote:

    The livedocs.dojotoolkit.org/dojo/query docs talk about various
    versions of dojo/query implementations (css, acme, etc.), but I don't
    see any docs that explain the differences between the various
    implementations. Does an explanation of the differences exist
    somewhere?
    -Chris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors


    _______________________________________________
    dojo-contributors mailing listdojo-contributors at mail.dojotoolkit.orghttp://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20111210/ed740f64/attachment-0001.htm
  • Bill Keese at Mar 4, 2012 at 7:14 pm
    Kris never responded to this so I tried to update the dojo/query doc
    myself, see the tables at the end of
    https://github.com/dojo/docs/blob/master/dojo/query.rst. Hopefully they
    are correct.

    It's especially hard to tell the difference between CSS2 and CSS2.1 since
    http://www.w3.org/TR/CSS2/selector.html actually lists the CSS2.1 syntax.

    Also, I noticed that the lite engine actually supports a few more selectors
    beyond plain CSS2, so I made a separate table for them.

    On Sat, Dec 10, 2011 at 7:48 AM, Bill Keese wrote:

    Explaining it via CSS selector level instead of engine name seems good,
    but the documentation doesn't really tell which selectors each CSS level
    supports.

    For CSS2 it just says:

    consisting of elemental selectors: .class, #id, tag, and star, attribute
    selectors, and child (>), descendant (space), and union (,) combinators

    That's vague to me, especially "attribute selectors".

    Earlier in the doc it lists the CSS three selectors (
    http://livedocs.dojotoolkit.org/dojo/query#standard-css3-selectors).
    How about breaking up that table into CSS2, CSS2.1, and CSS3?

    On Sat, Dec 10, 2011 at 12:39 AM, Kris Zyp wrote:

    I updated the docs to more explicitly state the capabilities of the two
    selector engines, lite and acme. I am not sure if there is anything more
    that you are looking for. However, I was very intentional about focusing
    the API and the documentation towards having developers specifying CSS
    selector level required by a module, rather than tight coupling to a
    specific engine.
    Thanks,
    Kris


    On 12/8/2011 11:08 PM, Bill Keese wrote:

    It's a good question. Specifically about which selectors each engine
    supports. I didn't find any good documentation, but the data seems to be
    out there in bits and pieces.

    1) Acme

    The selectors are listed in
    http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308
    ,
    although that doesn't show up well on our API site, perhaps because of
    the naming conflict with the new dojo/query module.

    Also on http://livedocs.dojotoolkit.org/dojo/query although perhaps
    that's not a comprehensive list.


    2) Lite

    There's a hint in
    http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245, which says:

    it
    is only supposed to do a simple CSS2 queries (#id, .class, tag and some
    [attributes]), roughly the same capability as Dustin Diaz's Qwery
    (https://github.com/ded/qwery))
    And then from lite.js:

    "^=": function(attrValue, value){
    return attrValue.indexOf(value) == 0;

    },

    "*=": function(attrValue, value){

    return attrValue.indexOf(value) > -1;

    },

    "$=": function(attrValue, value){

    return attrValue.substring(attrValue.length - value.length,
    attrValue.length) == value;
    },

    "~=": function(attrValue, value){

    return (' ' + attrValue + ' ').indexOf(' ' + value + ' ') > -1;

    },

    "|=": function(attrValue, value){

    return (attrValue + '-').indexOf(value + '-') == 0;

    },

    "=": function(attrValue, value){

    return attrValue == value;

    },

    "": function(attrValue, value){

    return true;

    }

    A thread about the engines is in
    http://thread.gmane.org/gmane.comp.web.dojo.devel/14203.


    3) sizzle

    I remember lots of performance charts for the various selectors back in
    the days of the acme/sizzle wars, but probably we don't need to document
    sizzle much anyway. Actually, looks like it's not even in our source tree
    anymore.

    On Wed, Dec 7, 2011 at 2:17 AM, Chris Mitchell wrote:

    The livedocs.dojotoolkit.org/dojo/query docs talk about various
    versions of dojo/query implementations (css, acme, etc.), but I don't
    see any docs that explain the differences between the various
    implementations. Does an explanation of the differences exist
    somewhere?
    -Chris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors


    _______________________________________________
    dojo-contributors mailing listdojo-contributors at mail.dojotoolkit.orghttp://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120305/8dfb457a/attachment-0001.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedDec 6, '11 at 12:17p
activeMar 4, '12 at 7:14p
posts6
users3
websitedojotoolkit.org

People

Translate

site design / logo © 2023 Grokbase