XSLTProcessor->importStylesheet()

(no version information, might be only in CVS)

XSLTProcessor->importStylesheet() -- Import stylesheet

Описание

class XSLTProcessor {

void importStylesheet ( DOMDocument stylesheet )

}

This method import the stylesheet into the XSLTProcessor for transformations.

Список параметров

stylesheet

The imported style sheet as a DOMDocument object.

Возвращаемые значения

Эта функция не возвращает значения после выполнения.



XSLTProcessor->importStylesheet()
bbrosseau at gmail
01-Mar-2005 08:46
For those who wants to use external documents, it is important not to use the DomDocument::loadXML because the processor will not have the path to look for other files
 
So if you want to transform some xml with a pre-generated stylesheet $f:

$f = 'somestylesheet.xsl';

  $xsl = DomDocument::loadXML(file_get_contents($f));

document('other.xml') will not work with relative path and

  $xsl = DomDocument::load($f);   
  
will!

<XSLTProcessor->hasExsltSupport()XSLTProcessor->registerPHPFunctions()>
 Last updated: Tue, 15 Nov 2005