cvs: pear /HTML_TINX TINX.php

From: Date: Mon, 31 Dec 2001 16:46:02 +0000
Subject: cvs: pear /HTML_TINX TINX.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1783@lists.php.net to get a copy of this message
sebastian Mon Dec 31 11:46:02 2001 EDT Modified files: /pear/HTML_TINX TINX.php Log: Add usage example. Index: pear/HTML_TINX/TINX.php diff -u pear/HTML_TINX/TINX.php:1.3 pear/HTML_TINX/TINX.php:1.4 --- pear/HTML_TINX/TINX.php:1.3 Sun Dec 30 15:27:59 2001 +++ pear/HTML_TINX/TINX.php Mon Dec 31 11:46:01 2001 @@ -16,14 +16,50 @@ // | Author: Sebastian Bergmann <sb@sebastian-bergmann.de> | // +----------------------------------------------------------------------+ // -// $Id: TINX.php,v 1.3 2001/12/30 20:27:59 sebastian Exp $ +// $Id: TINX.php,v 1.4 2001/12/31 16:46:01 sebastian Exp $ // /** * TINX - This Is Not XSLT * +* TINX is a small template engine that offers tag-triggered function +* calls, similar to the Java language bindings some XSLT processors, +* for instance Saxon and Xalan, offer. +* +* You can assign standard template variables, let TINX fill in +* template variables with global variables and call PHP functions +* through <?php: ... /> tags. +* +* Example +* +* <?php +* require 'HTML/TINX.php'; +* +* $t = new HTML_TINX('test.xml', true, true); +* $t->set_var('foo', 'test'); +* +* $bar = 'test'; +* echo '<pre>' . htmlspecialchars($t->parse()) . '</pre>'; +* +* function foobar($a, $b) { +* return "foobar($a, $b) called."; +* } +* ?> +* +* test.xml +* +* <foo>{foo}</foo> +* <bar>{bar}</bar> +* <foobar><php:foobar parameters="value1,value2" /></foobar> +* +* Output +* +* <foo>test</foo> +* <bar>test</bar> +* <foobar>foobar(value1, value2) called.</foobar> +* * @author Sebastian Bergmann <sb@sebastian-bergmann.de> -* @version $Revision: 1.3 $ +* @version $Revision: 1.4 $ * @access public */

« previous php.pear.cvs (#1783) next »