try<?php
/* Load the two XML sources */
$xml = new DomDocument; // from /ext/dom
$xml->load('example.xml');$xsl = new DomDocument;
$xsl->load('example.xsl');/* Configure the transformer */
$proc = new xsltprocessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml); // actual transformation
?> 详见
http://www.php.net/manual/en/ref.xsl.php

解决方案 »

  1.   

    php_xslt.dll和php_xsl.dll是两个不同的东西,虽然都完成同一任务。
    当然后者要比前者要好的多!如果你是想兼容php4下的代码,那么请连接php_xslt.dll(php,ini中没有,就加进去)
    如果你是想重写,那么请加载php_xsl.dll
      

  2.   

    请问为什么php_xsl.dll比php_xslt.dll好呢?
    手册上说:This extension is EXPERIMENTAL. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.
    这个扩展处于试验阶段...我是看了这段话才想用xslt的,另外在PHP5中是加载不了php_xslt.dll的。
      

  3.   

    就好比问“为什么php5比php4好”一般
    php_xslt.dll是可以加载的,加在php_xslt.dll的条件我想你不会不知道吧
      

  4.   

    xsl function与xslt function的区别是:
    前者以libxslt为基础,而后者则是Sablotron。
      

  5.   

    php5下加载php_xslt.dll会出:“无法找到动态链接库php4ts.dll于指定路径...”
    PHP Startup:Unable to load dynamic library '.\ext\php_xslt.dll' - 找不到指定的模块