<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jun 10, 2007, at 9:41 AM, Grant Rettke wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi folks,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Most good UML editors support the ability to export to XMI:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://en.wikipedia.org/wiki/XML_Metadata_Interchange">http://en.wikipedia.org/wiki/XML_Metadata_Interchange</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Regardless of our take on the role of UML and its editors, I've got a question.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">We have been looking at a technology called OAW:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.openarchitectureware.org">http://www.openarchitectureware.org</A>/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It provides a pretty straightforward way to transform XMI into</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">whatever you feel like generating. Using Eclipse it lets you write</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">transformations in a little statically typed functional language. For</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">example:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&lt;&lt;DEFINE Root for data::DataModel&gt;&gt;</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">   </SPAN>&lt;&lt;EXPAND Entity FOREACH entity&gt;&gt;</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&lt;&lt;ENDDEFINE&gt;&gt;</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This is awesome.  What do you use for the XMI metadata... triple brackets?</DIV><BLOCKQUOTE type="cite"><FONT class="Apple-style-span" color="#000000"><BR class="khtml-block-placeholder"></FONT><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">That functions starts processing the model at the highest level and</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">for each Entity it has inside of it, call the function Entity (for</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">type Entity).</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">How would one approach something like this in Scheme?</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Syntactic yuckiness aside, there's no shortage of work on the parallels between XML and XML transformations and s-expressions and s-exp transformations.  I would start by looking at Oleg Kiselyov's sxml representation of XML in s-expressions, and his work with others (including Shriram Krishnamurthi) on sxslt, a manipulation language for xml.  If this work does not directly apply, I suspect that minor alterations would yield something that is </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>- substantially nicer than existing systems, and</DIV><DIV>- totally unusable by people allergic to parentheses</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Would it be obvious to me if I read EOPL or SICP how one may approach</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">this problem?</DIV></BLOCKQUOTE><BR></DIV><DIV>Perhaps, yes.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The fundamental insight is that creating Yet Another "little ... functional language" is a colossal waste of time; embed the language you want in an existing one that is reasonably extensible.  There might be something interesting in the "statically typed" part... or maybe not.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Corrections always welcome,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>John Clements</DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>