(PHP 5, PHP 7, PHP 8)
XSLTProcessor::importStylesheet — Import stylesheet
public XSLTProcessor::importStylesheet(object $stylesheet): bool
This method imports the stylesheet into the XSLTProcessor for transformations.
stylesheetThe imported style sheet as a Dom\Document, DOMDocument or SimpleXMLElement object.
Throws a TypeError if stylesheet is not an XML object.
| Version | Description |
|---|---|
| 8.4.0 | Added support for Dom\Document. |
| 8.4.0 | Now throws a TypeError instead of a ValueError if stylesheet is not an XML object. |
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/xsltprocessor.importstylesheet.php