<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
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.<br>
Thanks,<br>
Kris<br>
<br>
On 12/8/2011 11:08 PM, Bill Keese wrote:
<blockquote
cite="mid:CAAXJfXWUr+CSGr=eGyVMfXK-UHRRBw6P=t4zem_2JAOJWV_XQA@mail.gmail.com"
type="cite"><font size="2">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.</font>
<div><br>
</div>
<div>
1) Acme</div>
<div><br>
</div>
<div>The selectors are listed in <a moz-do-not-send="true"
href="http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308">http://bugs.dojotoolkit.org/browser/dojo/dojo/trunk/selector/acme.js#L1308</a>,</div>
<div>although that doesn't show up well on our API site, perhaps
because of the naming conflict with the new dojo/query module.</div>
<div><br>
</div>
<div>Also on <a moz-do-not-send="true"
href="http://livedocs.dojotoolkit.org/dojo/query">http://livedocs.dojotoolkit.org/dojo/query</a>
although perhaps that's not a comprehensive list.</div>
<div><font size="2"><br>
</font></div>
<div><font size="2"><br>
</font></div>
<div><font size="2">2) Lite</font></div>
<div><font size="2"><br>
</font></div>
<div><font size="2">There's a hint in <a moz-do-not-send="true"
href="http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245">http://permalink.gmane.org/gmane.comp.web.dojo.devel/14245</a>,
which says:</font>
<div>
<br>
</div>
<div>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex;
border-left-width: 1px; border-left-color: rgb(204, 204,
204); border-left-style: solid; padding-left: 1ex; ">
<pre style="color: rgb(34, 34, 34); line-height: 19px; text-align: justify; background-color: rgb(255, 255, 255); ">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
(<a moz-do-not-send="true" rel="nofollow" href="https://github.com/ded/qwery" target="_top" style="color: rgb(0, 51, 102); font-weight: bold; text-decoration: none; font-size: x-small; ">https://github.com/ded/qwery</a>))</pre>
</blockquote>
<div>
<font size="2"><br>
</font></div>
<div><font size="2">And then from lite.js:</font></div>
<div><font size="2"><br>
</font></div>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex;
border-left-width: 1px; border-left-color: rgb(204, 204,
204); border-left-style: solid; padding-left: 1ex; ">
<font size="2">
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"^=":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
attrValue.indexOf(value) == 0;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>},</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"*=":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
attrValue.indexOf(value) > -1;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>},</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"$=":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
attrValue.substring(attrValue.length - value.length,
attrValue.length) == value;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>},</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"~=":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
(' ' + attrValue + ' ').indexOf(' ' + value + ' ') >
-1;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>},</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"|=":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
(attrValue + '-').indexOf(value + '-') == 0;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>},</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"=":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
attrValue == value;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>},</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>"":
function(attrValue, value){</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>return
true;</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left:
0.8ex; border-left-width: 1px; border-left-color:
rgb(204, 204, 204); border-left-style: solid;
padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre"> </span>}</blockquote>
<div><br>
</div>
</font></blockquote>
<div> </div>
<div><font size="2">A thread about the engines is in <a
moz-do-not-send="true"
href="http://thread.gmane.org/gmane.comp.web.dojo.devel/14203">http://thread.gmane.org/gmane.comp.web.dojo.devel/14203</a>.</font></div>
<div><font size="2"><br>
</font></div>
<div><font size="2"><br>
</font></div>
<div>3) sizzle</div>
<div><br>
</div>
<div><font size="2">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.</font></div>
<div><font size="2"><br>
</font><br>
<div class="gmail_quote">On Wed, Dec 7, 2011 at 2:17 AM,
Chris Mitchell <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ccmitchellusa@gmail.com">ccmitchellusa@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
The <a moz-do-not-send="true"
href="http://livedocs.dojotoolkit.org/dojo/query"
target="_blank">livedocs.dojotoolkit.org/dojo/query</a>
docs talk about various<br>
versions of dojo/query implementations (css, acme,
etc.), but I don't<br>
see any docs that explain the differences between the
various<br>
implementations. Does an explanation of the differences
exist<br>
somewhere?<br>
-Chris<br>
_______________________________________________<br>
dojo-contributors mailing list<br>
<a moz-do-not-send="true"
href="mailto:dojo-contributors@mail.dojotoolkit.org">dojo-contributors@mail.dojotoolkit.org</a><br>
<a moz-do-not-send="true"
href="http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors"
target="_blank">http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dojo-contributors mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dojo-contributors@mail.dojotoolkit.org">dojo-contributors@mail.dojotoolkit.org</a>
<a class="moz-txt-link-freetext" href="http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors">http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors</a>
</pre>
</blockquote>
<br>
</body>
</html>