| ZVON > > Templatotron |
| Intro / Search / ZVON |
| >> Page 5 << | Prev | Next | contents | introduction | reference | download | |
If the value to be computed is not a node-set but an XPath function then t:value-of attribute is used instead of t:select.
|
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> <t:title t:value-of="local-name(/*)"/> </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> |