Да, последний вариант лучше всего и главное работает

Только надо через loadXML загружать, иначе какие-то странные потери в коде
Остановился на таком варианте:
PHP код:
<?php
$xp = new XsltProcessor();
// create a DOM document and load the XSL stylesheet
$xsl = new DomDocument;
$xsl->load('style.xsl');
// import the XSL styelsheet into the XSLT process
$xp->importStylesheet($xsl);
// create a DOM document and load the XML datat
$xml_doc = new DomDocument;
include('content.php');
// transform the XML into HTML using the XSL file
if ($html = $xp->transformToXML(DomDocument::loadXML( $xw->outputMemory(true))))
{
echo $html;
}
else
{
trigger_error('XSL transformation failed.', E_USER_ERROR);
} // if
?>
вывод в броузер через loadXML()
Код:
<h2>Style loaded</h2>start<ul>
<li>Test php Document</li>
<li>Test xml Document</li>
</ul>end
вариант 2:
вывод в броузер через load()
Код:
<h2>Style loaded</h2>startend
Вопрос можно считать решенным
