Hello all,<br><br>I'm writing a web app and wanted to do some html generation (I really do not like to maintain or write html).<br><br>I'm thinking of writing a dsl based on the following:<br><br>def html():<br> return <br>
<br>def a():<br> return<br><br>def body():<br> return<br>(html,<br>...(head, (style, "id", {"font-color":"black"}))<br>...(body,<br>...... (a, "id", {"title":"bla"}, ("link title","<a href="http://www.link.com">http://www.link.com</a>")),<br>
......(p, "paragraph text")<br>...... )<br>...)<br>)<br><br>And then parsing the resulting list. (the specification of sorts is as far as I've got) I'd have to create the list as a string and then call a method which executes the contents as the methods would not be in the local scope.<br>
<br>The reason I'm posting is I'm curious what people think, I've been starting to perfer this style and am curious if a similar solution exists or if this is a good idea :) <br><br>I'll proberly finish it as a learning experience regardless.<br>
<br>I appreciate any responses :)<br><br>