[Seaside] Seafox HTML -> Seaside render methods translator

Philippe Marschall philippe.marschall at gmail.com
Mon Aug 2 04:59:00 UTC 2010

2010/8/1 Nick Ager <nick.ager at gmail.com>:
> Hi
> I've attached an initial release of a small side project I've been working
> on. It's called Seafox and it's a Firefox extension which translates HTML
> into Seaside render methods. It's far from perfect but hopefully useful in
> this initial version. To install, File->Open from within Firefox. A Seaside
> star-fish icon should appear at the bottom right of the browser. Open a page
> of html which contains some html you want to embed in a component. Press the
> "Seafox" button and a new tab will appear with a Seaside translation of the
> html.
> Why? The background to the project is that often when I try advocating
> Seaside to my non-Seaside developer friends, they protest that Seaside won't
> fit into their workflow. Their excuse is that they receive html from their
> designers then use that as their template. I know that templates vs Seaside
> render methods + CSS is a well trodden path (and don't want to reopen that
> discussion), instead I thought if I could make something that would give
> non-Seaside developers a start by taking a page design and translating into
> Seaside render methods that might alleviate one perceived obstacle.
> I've uploaded the code to http://www.squeaksource.com/Seafox. There's a
> ConfigurationOfSeafox in the metacello repository [1]. To install the code
> download ConfigurationOfSeafox and execute:
> (ConfigurationOfSeafox project version: '0.1') load
> The code registers a Seaside app at http://localhost:8080/seafox  which
> shows the html->seaside element mapping and the attribute mapping as well as
> giving a link to download the extension, The extension is dynamically
> created, and if you run it in Firefox, installed.
> I've also uploaded the application to: http://seafox.seasidehosting.st/ You
> can install the extension directly from there.
> Warning: I installed the code in the Seaside30rc to test it. The image froze
> when I tried browsing to the app. I haven't noticed this problem in non-one
> click installations, but wouldn't load it into you main working image.
> I should reiterate that it's not a perfect mapping, but hopefully it might
> be useful to a few people.

I just noted something funny, we have xml:lang on every tag when that
should probably be just lang. Also irrelevant seems to be gone from

The algorithm you use seems to work well for body tags but have
problems with header tags. For example look at the style tag:
- there's no such tag, simply the link tag which explains the selector
- it says the rel attribute is set with #beAlternateStylesheet
- it says the media attribute is set with #addHandheld
- it misses the attributes from the superclass
- it says the type attribute is set with #beRss

Apart from that, very nice work, thank you.


More information about the seaside mailing list