..." />
</xsl:if>
<HR/>
<!-- Выводим текст сообщения -->
<xsl:value-of select="MSG"/>
</p>
</xsl:template>
</xsl:stylesheet>
Теперь займемся самим php-скриптом.
<html>
<head>
<title>Guestbook</title>
<META
http-equiv="Content-Type"
content="text/html; charset=windows-1251">
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<?php
// Загружаем входящий документ
$sourcefile = "source.xml";
$sourcehandle = fopen($sourcefile, "r")
or die("Невозможно открыть входящий документ.");
$source = fread($sourcehandle, filesize($sourcefile));
// Загружаем преобразование
$stylesheetfile = "stylesheet.xsl";
$stylesheethandle = fopen($stylesheetfile, "r")
or die("Невозможно открыть файл преобразования");
$stylesheet = fread($stylesheethandle, filesize($stylesheetfile));
// Инициализируем XSLT-процессор
$xslt = @xslt_create() or die("Can't create XSLT handle!");