Mon Nov 23 13:13:22 UTC 2009 pix@kepibu.org * Start documentation diff -rN -u old-Oh, Ducks!/notes new-Oh, Ducks!/notes --- old-Oh, Ducks!/notes 2015-10-20 22:47:38.000000000 +0000 +++ new-Oh, Ducks!/notes 2015-10-20 22:47:38.000000000 +0000 @@ -1,4 +1,117 @@ #-*-mode: org;-*- +* Purpose +"Oh, Ducks!" is an extension to cl-unification to make parsing +structured documents easy, using CSS selectors. +* Installation +** Prerequisites + + cl-unification + + cl-ppcre + + split-sequence + + alexandria + + asdf-system-connections + * closure-html + * cxml +[+] Mandatory [*] Optional +** 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 +HTML/XML parsing library such as cxml or closure-html. + +Start with: + :(asdf:oos 'asdf:load-op :oh-ducks) +If you would like to use the built-in support for parsing via +closure-html (which you almost certainly do), you'll also want to load +closure-html: + :(asdf:oos 'asdf:load-op :closure-html) +And, if you want to use DOM objects provided by cxml: + :(asdf:oos 'asdf:load-op :cxml) + +** Load-order Caveats +closure-html and cl-unification each define competing readers on #t. +To avoid load-order issues resulting in an indeterminate reader on #t, +you'll probably want to add + :#.(set-dispatch-macro-character #\# #\T 'unify::|sharp-T-reader|) +to the top of any file which uses cl-unification's reader templates. + +Please feel free to submit patches to closure-html and cl-unification +to fix this problem. +* Usage +The combination of oh-ducks and closure-html provides an HTML template +for use with cl-unification, and has the following syntax: + + (match (#t(html [(:model )] + +) + ) + &body) + selectors := ( . ) | + ( .