Exemplo n.º 1
0
}
// ******************* PROVEDENI XSL TRANSFORMACE HLAVNI STRANKA ********************************
// naètení dokumentu XML
$xml = new DomDocument();
$xml->load($fname);
// naètení stylu XSLT dle vybraneho jazyka
$xsl = new DomDocument();
if ('czech' == $_SESSION['step_all_1']['language']) {
    $xsl->load("./xml/xslt/blog_cz.xsl");
} else {
    $xsl->load("./xml/xslt/blog_en.xsl");
}
// vytvoøení procesoru XSLT
$proc = new xsltprocessor();
$proc->registerPhpFunctions();
$proc->importStylesheet($xsl);
// provedení transformace a vypsání výsledku
$newdom = $proc->transformToDoc($xml);
$newdom->save($dirname . "/" . $_SESSION['step_all_4']['presentation_name'] . ".php");
deleteXmlHeading($dirname . "/" . $_SESSION['step_all_4']['presentation_name'] . ".php");
chmod($dirname . "/" . $_SESSION['step_all_4']['presentation_name'] . ".php", 0744);
// ***************** ZJISTI URL VYSLEDNE STRANKY ****************************************************
$url = getUrl($_SESSION['step_all_2']['user_name'], $_SESSION['step_all_4']['presentation_name'], $fname);
$_SESSION['step_blog_8']['page_url'] = $url;
?>

<form action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
" method="post">
    
Exemplo n.º 2
0
<?php

echo "Test 10: EXSLT Support";
$dom = new domDocument();
$dom->load(dirname(__FILE__) . "/exslt.xsl");
$proc = new xsltprocessor();
$xsl = $proc->importStylesheet($dom);
$xml = new DomDocument();
$xml->load(dirname(__FILE__) . "/exslt.xml");
print $proc->transformToXml($xml);
Exemplo n.º 3
0
<?php

$xslDom = new domdocument();
$xslDom->load('rss.xsl');
$xmlDom = new domdocument();
$xmlDom->load('data.rss');
$xsl = new xsltprocessor();
$xsl->importStylesheet($xslDom);
print $xsl->transformToXML($xmlDom);