Здравствуйте!
FreeBSD6.1 + Apache2 + PHP5(xsl.so). Разбираюсь с xslt.#1.php
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('1.xml');
$xsl = new DOMDocument;
$xsl->load('1.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
//$proc->importStyleSheet($xsl); // attach the xsl rules
//echo $proc->transformToXML($xml);
echo "OK";
?>
#1.xml
<!-- 1.xml -->
<hello>
<text>Hello World!</text>
</hello>
#1.xsl
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
<h1>
<xsl:value-of select="//text"/>
</h1>
</xsl:template>
Результат работы 1.php:
Warning: DOMDocument::load() [function.DOMDocument-load]: Extra content at the end of the document in /usr/local/apache/www/apache22/data/1.xsl, line: 4 in /usr/local/apache/www/apache22/data/1.php on line 7
OK
Не совсем то, на что я расчитывал... Где тут собака нарыла?
Спасибо.