/
/cxml.lisp
 1 (in-package #:oh-ducks)
 2 
 3 (eval-when (:compile-toplevel :load-toplevel :execute)
 4   (export 'dom)
 5   (export 'xml))
 6 
 7 (defclass xml-template (css-selector-template) ())
 8 
 9 (add-handler 'dom 'cxml-dom:make-dom-builder)
10 
11 (unless *default-parser*
12   (setf *default-parser* (rcurry #'cxml:parse (get-handler-for-model 'dom))))
13 
14 (defmethod make-template ((kind (eql 'xml)) (spec cons))
15   (destructuring-bind (&key parser model)
16       (append (when (%spec-includes-opts spec) (second spec))
17               (list :model 'dom))
18     (make-instance 'xml-template
19                    :parser (or parser (rcurry #'cxml:parse (get-handler-for-model model)))
20                    :spec spec)))