Salve ragazzi, sto cercando di far funzionare una pagina mediante il processore XSLT del PHP che mi pare installato su questo server.
Dunque io ho costruito tre file di prova
xslt.php
input.xmlCodice PHP:<?php
$xml = new DOMDocument();
$xml->load('input.xml');
$xsl = new DOMDocument;
$xsl->load('format.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
print($proc->transformToXML($xml));
?>
format.xslCodice PHP:<?xml version="1.0" encoding="utf-8">
<books>
<book name="PHP Trucchi e segreti"></book>
<book name="Master & Commander"></book>
<book name="Ceneri"></book>
</books>
ma il risultato è sempre una pagina bianca :( e non mi capacito del perché, a meno che appunto il processore XSLT non sia attivo con qualche restrizione, nessuno sa nulla?Codice PHP:<?xml version="1.0" encoding="utf-8">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output
method="xml"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="/books/book">
<xsl:value-of select="@name" /><br />
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

LinkBack URL
About LinkBacks
