I am using Compojure, Hiccup and Lacij to essentially generate SVG documents. I am using data.xml to perform some post processing on the output from tikkba.utils.dom/spit-str for adding javascript essentially doing
{:tag :script, :attrs {:type "text/ecmascript", :xlink:href (str script-name ), :xmlns "http://www.w3.org/1999/xlink"}}
While it works for Javascript it doesn't seem to work for xml stylesheets (XSLT or CSS) as this tag needs to be the sibling of the xml node not the svg node. I am trying to find out how I can do this and to no solution as of now because the xml node is generated after the fact. Is it possible to just embed the xml data structure produced by clojure.data.xml in a hiccup formatted data structure? As of now I am not using the html5 macro. The svg doc node directly goes to ring and it generates the html page. Thanks in advance.
Nevermind. Silly me did not realise that I could just use :xml in hiccup/html5 macro then provide it with the output from... (with-out-str (clojure.xml/emit my-root-xml-node))