On Thu, Jun 17, 2010 at 9:47 AM, Kevin Jardine <[email protected]> wrote: >> What function instead of bindStrings do I call to insert >> XML fragments?
I think the function you are looking for is bindSplice. The "Splice m" in its type signature is a TemplateMonad computation that returns a list of nodes. > Or am I making a conceptual error here? > > Perhaps I should be using runTemplate to get the XML fragments and only use > renderTemplate at the very top level? > > This would keep the input as structured nodes and convert to bytestrings only > at the last step. Yeah, this was our intent. renderTemplate is the only way to get things out of TemplateMonad. By using bindSplice as I mentioned above, you keep your data is structured nodes when possible. bindStrings is only intended as a convenient way to pass strings into templates. _______________________________________________ Snap mailing list [email protected] http://mailman-mail5.webfaction.com/listinfo/snap
