Add some notes
Sun Dec 13 05:32:46 UTC 2009 pix@kepibu.org
* Add some notes
diff -rN -u old-Oh, Ducks!/notes new-Oh, Ducks!/notes
--- old-Oh, Ducks!/notes 2016-01-21 07:57:54.000000000 +0000
+++ new-Oh, Ducks!/notes 2016-01-21 07:57:54.000000000 +0000
@@ -15,7 +15,7 @@
** Loading
Loading "Oh, Ducks!" is just like loading any other ASDF system.
However, because it does not mandate a particular HTML or XML parser,
-it does not generally become useful until you have also loading an
+it does not generally become useful until you have also loaded an
HTML/XML parsing library such as cxml or closure-html.
Start with:
@@ -75,11 +75,22 @@
Each selector should result in the same elements which would be
affected by the same CSS selector. That is,
- #id => elements with id of "id".
+ #id => elements with id of "id"
.foo.bar => elements with both "foo" and "bar" classes
div => all <div>s
and so forth.
+NOTE: selectors are currently bound in parallel. That is, given
+ #t(html (<selector-1> ...)
+ (<selector-2> ...))
+selector-1 and selector-2 do not interact. If they are both "foo", they'll
+return identical results. I often find myself wanting to also say something
+like:
+ #t(html (<selector-1> ...)
+ (<element-after-selector-1> ...))
+Ideas for a syntax to distinguish between the two cases are welcome (:mode
+parallel) vs (:mode sequential), perhaps? (Or even adjacent, sibling?)
+
*** Limitations
Currently, selector terms are limited to alphanumeric characters, and
@@ -142,3 +153,11 @@
** Submit patch to cl-unification to add (enable/disable-template-reader) functions
** Submit patch to closure-html to add (enable/disable-reader) functions
** non-css templates (e.g., for matching on text of element)?
+Maybe special-case string/regexp-templates, so for example
+ #t(html ("div" (#t(regexp "f(o+)bar") . ?div)))
+would match [<div>foooobar</div>]?
+
+ #t(html ("div" . #t(regexp "f(o+)bar" (?o))))
+might cause some difficulty, however--we should get a list of matched elements
+for the div selector, but the regexp variable (?o) can only match once (without
+some wacky environment merging, anyway).