XSLTProcessor::transformToURI
(No version information available, might be only in CVS)
XSLTProcessor::transformToURI — Transforma para URI
Descrição
XSLTProcessor
int
transformToURI
( DOMDocument $doc
, string $uri
)
Transforma o node para uma URI aplicando o stylesheet dado pelo método XSLTProcessor::importStylesheet.
Parâmetros
- doc
-
O documento transformado.
- uri
-
Valor Retornado
Retorna o número de bytes escrito ou FALSE se um erro ocorrer.
Exemplos
Example#1 Transformando para um arquivo HTML
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('collection.xml');
$xsl = new DOMDocument;
$xsl->load('collection.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
$proc->transformToURI($xml, 'file:///tmp/out.html');
?>