(No version information available, might be only in CVS)
XSLTProcessor::transformToDoc — Transforme en un document DOM
Transforme le noeud source en un DOMDocument
en y appliquant la feuille de style donnée par la méthode XSLTProcessor::importStylesheet
.
Le noeud à transformer.
Le DOMDocument
résultant ou FALSE
si une erreur survient.
Exemple 2833. Transformation en un document DOM
<?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
echo
trim
(
$proc
->
transformToDoc
(
$xml
)->
firstChild
->
wholeText
);
?>
L'exemple ci-dessus va afficher :
Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
XSLTProcessor::transformToURI |
XSLTProcessor::transformToXML |