On Tue, Mar 29, 2011 at 16:56, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > On 29 Mrz., 15:13, B Smith-Mannschott <bsmith.o...@gmail.com> wrote: > >> How does one really separate "content" from >> "presentation" in such a case? > > Maybe not feasible, but a thought, that just came to my mind: do it > like enlive. Parse the templates into an abstract tree and then use > selectors to modify the tree. Do the indentation for readability when > printing. Of course you cannot select on tags, but one can find a some > way to do it. Eg. (snippet "class X { void some-method() > { template; } }" [methods] [:method] (clone-for [[args body] methods] > [:fn-arg-list] (content (interpose \, args)) [:fn-body] (substitute > body))).
Thanks Meikel, I'm currently looking at enlive to see if I can understand how it works and perhaps adapt its approach to my needs. At first blush, it looks technically interesting. :) // ben -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en