Programming with XML Templates Clause Samples

Programming with XML Templates. ‌ Dynamic XHTML document are often generated by printing to an output stream, as exemplified by Servlets. The MAWL project invented a more struc- tured approach by defining XML templates as primitive values in a Web pro- gramming language [17, 2]. A template in MAWL is a wellformed XML fragment containing named gaps which at runtime may be plugged with string values. The <bigwig> and JWIG projects [6, 9] extend this concept to higher-order tem- plates, in which gaps may also be plugged with other templates. The following is an example of an XML template: members/Outer.xml: <html> <head><title><[title]></title></head> <body bgcolor=[color]> <[body]> </body> </html> It contains two gaps named title and body, and one attribute gap named color. Attribute gaps may only be plugged with string values, while ordinary gaps may be plugged with both strings and templates. The plug operation