ANN: xmlgen-1.2 (overrides previous posting) 
Author Message
 ANN: xmlgen-1.2 (overrides previous posting)

Announcing
                                xmlgen
                             version 1.2

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

===== WHAT's NEW?

o xmlgen is now part of TclXML on sourceforge. Thanks to Steve Ball
for giving a suitable home to xmlgen.

o Implemented a markup macro for a sidebar navigation suggested by Ed
Suominen.

o Used this as an example to navigate the docs of xmlgen itself.

===== WHERE TO GET?

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

  http://www.*-*-*.com/

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
                              Announcing
                                xmlgen
                             version 1.2

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

===== WHAT's NEW?

o xmlgen is now part of TclXML on sourceforge. Thanks to Steve Ball
for giving a suitable home to xmlgen.

o Implemented a markup macro for a sidebar navigation suggested by Ed
Suominen.

o Used this as an example to navigate the docs of xmlgen itself.

===== WHERE TO GET?

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

  http://www.*-*-*.com/

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
                              Announcing
                                xmlgen
                             version 1.2

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

===== WHAT's NEW?

o xmlgen is now part of TclXML on sourceforge. Thanks to Steve Ball
for giving a suitable home to xmlgen.

o Implemented a markup macro for a sidebar navigation suggested by Ed
Suominen.

o Used this as an example to navigate the docs of xmlgen itself.

===== WHERE TO GET?

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

  http://www.*-*-*.com/

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



Sat, 06 Nov 2004 19:21:17 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ANN: xmlgen-1.2.1

2. ANN: htmlgen and xmlgen 1.1

3. ANN: htmlgen and xmlgen, Writing HTML with Tcl

4. Swig typemaps and me == bananas - can't override a previous %apply

5. Correction of my previous posting.

6. Sorry Happy.Exe previous posting

7. loop variants (Re: ^^^^^ignore the previous post)

8. views,dynamic binding, addendum to my previous posting

9. Retraction of previous posting

10. How can I see previous postings

11. omit previous post about intrument drivers

12. Correction to previous post, asterik should be replaced with apostrophe

 

 
Powered by phpBB® Forum Software