Source for file xsl.php
Documentation is available at xsl.php
* Genera un XSL dinamico prendendo le informazioni di tabella.
* @desc File XSL dinamico di default
* @author M.Marcello Verona
* @copyright 2007 M.Marcello Verona
* @license http://www.gnu.org/licenses/gpl.html GNU Public License
require ("../inc/conn.php");
require ("../inc/func.comuni.php");
require ("../inc/func.frontend.php");
$QB = (isset ($_GET['querybased']) && $_GET['querybased']== '@') ? 1: 0;
// richiesta di foglio querybased
$nome_report = preg_replace("|[^a-z0-9_-]+|i","_",$_GET['action']);
$q_def = vmsql_query("SELECT def_query FROM {$db1['frontend']}.xml_rules WHERE nome_report='$nome_report' LIMIT 1",$link);
$titolo = "Report $nome_report";
// PRENDE LE CARATTERISTICHE DELLA TABELLA
// prende il nome della tabella
$titolo= "Tabella $tabella";
<? xml version="1.0" encoding=" utf-8" ?>
< xsl: stylesheet version="1.0" xmlns: xsl=" http:// www. w3. org/1999/ XSL/ Transform">
< xsl: output method=" xhtml" indent=" yes"
doctype- system=" http:// www. w3. org/ TR/ xhtml1/ DTD/ xhtml1- transitional. dtd"
doctype- public="-// W3C// DTD XHTML 1.0 Transitional// EN"
omit- xml- declaration=" yes"
< xsl: template match="/ recordset">
< html xmlns=" http:// www. w3. org/1999/ xhtml" lang=" it">
border- top:2 px solid #6495 ED;
border- bottom:2 px solid #6495 ED;
border- collapse: collapse;
< xsl: for- each select=" row">
< table summary=" tabella riepilogo">
foreach($cols as $k=> $val){
$XSL.= "<tr><th>$val: </th><td><xsl:value-of select=\"$val\" /></td></tr>\n";
header("Content-Type: text/xml");
|