You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Massimo Manghi <mx...@apache.org> on 2012/12/31 00:21:22 UTC

simple XML string mark up

In rivet/rivet-tcl/ I added a new command for string mark up.

unlike ::rivet::html this new command (named ::rivet::xml)
doesn't output to the standard output and instead it returns
the string it creates. Thus ::rivet::xml can be used within
the shorthand notation for simple string output to compose more
complex strings.

To its most basic form ::rivet::xml can be called like ::rivet::html

::rivet::xml Test b i
<== <b><i>Test</i></b>

markup arguments are treated like lists whose first element is the tag
and the other elements are paired as attribute-value pairs

::rivet::xml Test [list div class box id testbox] b i
<== <div class="box" id="testbox"><b><i>Test</i></b></div>

::rivet::xml "anything ..." div [list a href "http://..../" alt 
"alternate message"]
<== <div><a href="http://..../" alt="alternate message">anything 
...</a></div>

the command is still undocumented (and unsupported). I'm open to change
the command name and its arguments. My goal is to have something to 
generate
quick XML to be put in case also within <?= ...?>

happy new year

  -- Massimo



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org