On Mon, Dec 20, 2010 at 3:18 AM, Adam Chlipala <[email protected]> wrote: > This is what I recommend. Every XML type is just a C string from the FFI's > perspective, so you just need to write a function that returns a string. > You can write that type as [uw_Basis_string], [char*], or whatever other > synonym you like. You can return normal string literals.
Thanks I'll give that a try. I'm converting an existing small webapp I wrote in Factor a while ago to Ur/Web as a learning exercise. It's a pretty trivial app to provide a 'river of news' list of items from various RSS/Atom feeds, updated hourly. It's optimized for reading on my phone and to allow adding/removing feeds and searching though past entries. This involves reading RSS feeds and displaying the HTML from the feeds in the page generated by Ur/Web. The currently running Ur/Web version is at http://newsriver.co.nz. You can see in the displayed article summaries that a lot of the HTML slips through " , <em>, <!-- comments -->, etc". I thought I'd use the Html parser to 'whitelist' HTML I allowed. It throws an error on HTML it doesn't understand though. Is there a way to have it ignore/remove non-whitelisted elements? Some way of catching the error and continuing? Failing that I can escape to the FFI and run an external script I guess. So far the development has been relatively smooth. The main oddness has been the date/time conversions that I raised Mantis issues for. Chris. -- http://www.bluishcoder.co.nz _______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
