


я наверно туплю, но вот:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
<xsl:template match="/">
<xsl:apply-templates select="/document/advertisement"/>
</xsl:template>
<xsl:template match="/document/advertisement">
<!-- Определяем высоту баннера -->
<xsl:variable name="height">
<xsl:choose>
<xsl:when test="height != 0">height: <xsl:value-of disable-output-escaping="yes" select="height"/>px;</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем ширину баннера -->
<xsl:variable name="width">
<xsl:choose>
<xsl:when test="width != 0">width: <xsl:value-of disable-output-escaping="yes" select="width"/>px;</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- В зависимости от типа баннера отображаем соответствующий код -->
<xsl:choose>
<!-- Графический баннер -->
<xsl:when test="@type = 0">
<div style="{$height} {$width}">
<xsl:choose>
<!-- Задана ссылка -->
<xsl:when test="image_link != '' ">
<a href="/showbanner/?list_id={list_id}">
<img border="0" style="{$height} {$width}" src="{image_full_path}"/>
</a>
</xsl:when>
<!-- Для баннера не задана ссылка -->
<xsl:otherwise>
<img border="0" style="{$height} {$width}" src="{image_full_path}"/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:when>
<!-- Текстовый баннер -->
<xsl:when test="@type = 1">
<div style="{$height} {$width}">
<xsl:value-of disable-output-escaping="yes" select="text"/>
</div>
</xsl:when>
<!-- Всплывающий баннер -->
<xsl:when test="@type = 2">
<SCRIPT language = "JavaScript">
<xsl:comment>
<xsl:text disable-output-escaping="yes">
<![CDATA[
var popUp = 0;
var popURL = "/]]></xsl:text><xsl:value-of select = "url" /><xsl:text disable-output-escaping="yes"><![CDATA[";
var popWidth = ]]></xsl:text><xsl:value-of select = "width" /><xsl:text disable-output-escaping="yes"><![CDATA[;
var popHeight = ]]></xsl:text><xsl:value-of select = "height" /><xsl:text disable-output-escaping="yes"><![CDATA[;
popUp = window.open(popURL, "popup", "width="+popWidth+", height="+popHeight+", status=yes, scrollbars=yes, location=no, menubar=no, directories=no, resizable=no, titlebar=yes");
]]>
</xsl:text>
</xsl:comment>
</SCRIPT>
</xsl:when>
<!-- Flash-баннер -->
<xsl:when test="@type = 3">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="{width}" height="{height}">
<param name="movie" value="http://www.edu78.ru/upload/banners/banner_1287580865.swf" />
<param name="quality" value="high"/>
<param name="href" value="http://www.edu78.ru/showbanner/?list_id={list_id}"/>
<param name="flashvars" value="banner_href=http://www.edu78.ru/showbanner/?list_id={list_id}"/>
<embed src="{swf_full_path}" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="{width}" height="{height}"></embed>
</object>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>