XSLTProcessor::transformToURI

(No version information available, might be only in CVS)

XSLTProcessor::transformToURI — Transforme en URI

Description

class XSLTProcessor {
int transformToURI ( DOMDocument $doc, string $uri )
}

Transforme le noeud source en une URI en y appliquant la feuille de style donnée par la méthode XSLTProcessor::importStylesheet .

Liste de paramètres

doc

Le document transformé.

uri

Valeurs de retour

Retourne le nombre d'octets écrits ou FALSE si une erreur survient.

Exemples

Exemple 2834. Transformation en un fichier HTML

<?php

// Chargement du source XML
$xml  = new  DOMDocument ;
$xml -> load ( 'collection.xml' );

$xsl  = new  DOMDocument ;
$xsl -> load ( 'collection.xsl' );

// Configuration du transformateur
$proc  = new  XSLTProcessor ;
$proc -> importStyleSheet ( $xsl );  // attachement des règles xsl

$proc -> transformToURI ( $xml 'file:///tmp/out.html' );

?>

Voir aussi

XSLTProcessor::transformToDoc
XSLTProcessor::transformToXML