[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-cvs
Subject: [PEAR-CVS] cvs: pear /HTML_TINX TINX.php
From: "Sebastian Bergmann" <sb () sebastian-bergmann ! de>
Date: 2001-12-31 16:46:02
[Download RAW message or body]
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
*/
--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, e-mail: pear-cvs-unsubscribe@lists.php.net
For additional commands, e-mail: pear-cvs-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic