ZVON > > Templatotron
>> Page 4 << | Prev | Next | contents | introduction | reference | download |

Attributes from other namespaces then the Templatotron one which occurs on the t:* elements appear on the outputted elements. The parts inside "{}" brackets are evaluated as in XSLT.

XML source

<colors>
     <red>red</red>
     <blue>blue</blue>
     <green>green</green>
</colors>

Templatotron source

<xhtml xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://zvon.org/templatotron" >
     <head>
          <title>Colors</title>
     </head>
     <body>
          <t:p t:select="/*/*" style="color:{.}"/>
     </body>
</xhtml>
Output

<xhtml xmlns="http://www.w3.org/1999/xhtml" >
     <head>
          <title>Colors</title>
     </head>
     <body>
          <p style="color:red">red</p>
          <p style="color:blue">blue</p>
          <p style="color:green">green</p>
     </body>
</xhtml>