
			      Announcing
				xmlgen
			     version 1.2.1

for easy and dynamic creation of HTML/XML with Tcl.

===== WHAT's NEW?

o The install fiddling got really on my nerves and I converted it to
use bras (http://bras.berlios.de). But don't worry, you don't need to
install bras now. It comes along and serves as a nice built/install
processor :-)

===== WHERE TO GET?

Xmlgen was integrated as a package into the TclXML repository on
sourceforge. Look at 

  http://sourceforge.net/projects/tclxml/

and follow the links.

===== WHAT IS IT?

Inspired by discussions about namespacing cgi.tcl and the difference
between cgi.tcl and several packages in tcllib, I prepared xmlgen and,
on top of it htmlgen.

Similar to cgi.tcl, an XML tag is defined as a Tcl command. It prints
the opening tag, then executes its body argument and then prints the
closing tag. The body argument, being a script, will again contain
markup commands which behaves in the same way. In short, you write

  set text "some prepared text"
  ul color=red ! {
    li - one 
    li - two can have some [b bold]
    li - $text
  }
  p + {
    When you use the "!", the body of the markup command is evaluated,
    with "+" like here, it is passed through [em subst]. With the "-"
    it is taken as is. In all three cases the result is printed. Only
    if non of them is given, the result is taken as is and simply
    returned.
  }   

to get

  <ul color="red">
   <li>one
   </li>
   <li>two can have some <b>bold</b>
   </li>
   <li>some prepared text
   </li>
  </ul>
  <p>When you use the "!", the body of the markup command is evaluated,
    with "+" like here, it is passed through <em>subst</em>. With the "-"
    it is taken as is. In all three cases the result is printed. Only
    if non of them is given, the result is taken as is and simply
    returned.
  </p>


Currently, xmlgen contains just two important commands, namely
[declartag], which creates a proc for a tag, and [buffer], which
collects the output of all the markup commands in a variable for later
reuse.

Package htmlgen builts on that and declares all HTML tags as commands.


===== WHAT IT IS NOT!

In contrast to cgi.tcl, htmlgen does not contain any special knowledge
about individual HTML tags. In addition, it does not have CGI parsing,
because there is already package ::ncgi in tcllib.


Comments welcome,
  Harald Kirsch
