What are some common limitations of using XSLT with PHP?

One common limitation of using XSLT with PHP is the lack of native support for XSLT 2.0 features, which can limit the functionality of your transformations. To overcome this limitation, you can use the PHP XSL extension or a third-party library like SabreX or Saxon/C to access more advanced XSLT features.

// Example using the PHP XSL extension
$xsl = new XSLTProcessor();
$xsl->importStylesheet(DOMDocument::load('stylesheet.xsl'));
$result = $xsl->transformToXML(DOMDocument::load('input.xml'));
echo $result;