function chapmenu($depth) { $lang = $GLOBALS["settings"]->getLang(); $chapmenu_xml = rootPath($depth) . "locale/{$lang}/locale.xml"; $chapmenu_xsl = rootPath($depth) . "xsl/chapmenu.xsl"; return xslt2($chapmenu_xml, $chapmenu_xsl); }
<?php require_once '../../include/xslt2.inc.php'; require_once '../../include/page.surround.inc.php'; require_once '../../include/common.inc.php'; $depth = 2; // two levels from root $xml = "../../locale/no/locale.xml"; $xsl = "../../xsl/keys.xsl"; $bp = new BeginPage(); echo $bp->display(); echo chapmenu($depth); ?> <?php echo xslt2($xml, $xsl); ?> </body> </html>