On Mon, 2011-02-21 at 22:55 -0800, Cristian Petrescu Prahova wrote:
> cellsSplice :: Splice Application
> cellsSplice = do
> liftIO $ putStrLn "hi" -- make sure we invoke this Splice
> return $ map cellify ["a", "b", "c"]
> where
> cellify type_ = X.Element "td" [] $ [X.Element "div" [("id",
> "type")] $ [X.Element "img" [("src", pack $ "/img/" ++ type_),
> ("width", "200"), ("height", "100")] $ [X.TextNode $ pack type_]]]
>
> When embedding this into the index.tpl of my application via a <cells/
> > tag, it returns an empty response:
The problem here is that you have an img element with a child node, but
HTML specifies that img elements must be empty (they don't even have
close tags). In this case, xmlhtml produces an error, which may be
getting logged somewhere.
--
Chris Smith
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap