This business of non-Turing templates have been known in HTML and before that, in GUI in general, by the name of Data Binding.
In Internet Explorer http://msdn.microsoft.com/workshop/author/databind/data_binding.asp In Windows Presentation Foundation http://msdn2.microsoft.com/en-us/library/ms752347.aspx Two-way binding in ASP.NET http://msdn.microsoft.com/msdnmag/issues/06/12/ExtendASPNET/ Windows Forms Data Binding http://msdn2.microsoft.com/en-us/library/ef2xyb33.aspx Internet Explorer 4.0-5.0 (1997-98) introduced dynamic two-way hierarchical binding was first introduced, a very powerful feature, especially coupled with hierarchical SQL query. HTML could be bound to XML data islands, which could be fetched from the server without reloading the page (technology that much later became known as AJAX). --- Terrence Brannon <[EMAIL PROTECTED]> wrote: > On 3/30/07, Oleg Kobchenko <[EMAIL PROTECTED]> wrote: > > As far as was able to understand, the idea is to > > use static HTML with special attributes > > > > <span meld:id=product>product_name</span> > > > > Which are then transformed to actual page at run-time. > > > > How to deal with loops? > > pretty easy - just clone the sample row, pop in the data, then append ... > > In-line server-side code blocks? > > I'm not sure what this would be OK, they are against code blocks for separation. > > Generation of data-driven HTML? > > I'm not sure what this is either. But anything useful with an HTML > tree can be done with tree > rewriting... and you are less likely to suffer the pitfalls of dealing > with HTML as a string Example of data driven HTML. <x:def name="CPU" param="p"> <li>Clock <span x:text="p.Freq"></span></li> <li>Cores <span x:text="p.Cores"></span></li> </x:def> <x:def name="Drive"> <li>Capacity <span x:text="p.Capacity"></span></li> <li>Clock <span x:text="p.Freq"></span></li> </x:def> <p>Catalog</p> <div x:for="Items:item"> <p>Name <span x:text="item.Name"></p> <ul> <li>Type <span x:text="item.Type"></li> <!-- Template chosen based on Type --> <li x:replace="{item.Type}:item">Type-specific attrs</li> <li><a href="/store&item={item.ID}">Buy</a></li> </ul> </div> ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
