Cool. I haven't done it yet though - need more time with an internet
connection.
> I like your optimisation. In theory the generated builder could be broken
> down into methods or even classes based on the DOM. So you could have rules
> like, all divs go in there own method unless they are wrapper-divs. But
> actually I think this goes a bit too far.
Yes, it's difficult to know when to stop. Other things I thought of were:
1) condense whitespace in text nodes because insignficant whitespace
gets rendered as "\t\t\t\t\t\t" etc.
2) improve the inline-variable-when-only-one-child rule to ignore
child text nodes that are only whitespace. It needs a bit of
tree-pruning.
> Has Robert Rees contacted you for the geek night event he is planning in
> June?
> It seems to be good place to promote hypirinha...
Sounds great. I've signed up for a 5 minute slot.
cheers,
-Alistair
I finally got round to checking in the missinary code you wrote. It's here:
http://hypirinha.googlecode.com/svn/trunk/java-extras/html2hypirinha
And deployed here:
http://hypirinha.appspot.com/html2hypirinha
I added you as a project owner to the google code project.
The minimal set of unit tests are running in cruise here:
http://build.hypirinha.org/cruise/tab/pipeline/history/html2hypirinha
I'll send you cruise login details off-list.
I'm afraid I slipped back to the bad habit of writing a build script
in bash (this time with the help of my new friend sed). If fancy
changing it to use buildobjects, please go ahead, I'd be fascinated to
see how it goes.
-Alistair