<?xml version="1.0" encoding="windows-1251"?>
<!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" encoding="Windows-1251" indent="yes" method="text" omit-xml-declaration="no" version="1.0" />

<xsl:template match="/document_list">
Здравствуйте, <xsl:value-of select="order_list/site_user_fio"/>!

Вами был сделан заказ на сайте http://<xsl:value-of select="order_list/shop/site_alias_name"/>

<xsl:apply-templates select="order_list"/>

Заказанные товары:
-------------------------------------------------------------
<xsl:apply-templates select="items_order"/>
-------------------------------------------------------------
Итого: <xsl:value-of select="order_list/sum"/>&#xA0;<xsl:value-of select="order_list/currency/currency_name"/>

Через некоторое время с Вами свяжется наш менеджер, чтобы согласовать заказанный товар и время доставки.

Спасибо за использование услуг нашего магазина.
</xsl:template>

<!-- Шаблон вывода данных о заказе -->
<xsl:template match="order_list">

Данные доставки:
1. ФИО: <xsl:value-of select="site_user_fio"/>
2. E-mail: <xsl:value-of select="site_users_email"/>
3. Телефон: <xsl:value-of select="site_users_phone"/>
4. Факс: <xsl:value-of select="site_users_fax"/>
<xsl:variable name="country" select="country_name"/>
<xsl:variable name="location">, <xsl:value-of select="location_name"/></xsl:variable>
<xsl:variable name="city">, <xsl:value-of select="city_name"/></xsl:variable>
<xsl:variable name="city_area">, <xsl:value-of select="city_area_name"/></xsl:variable>

Адрес доставки:
<xsl:value-of select="$country"/>
<xsl:value-of select="$location"/>
<xsl:value-of select="$city"/>
<xsl:value-of select="$city_area"/>&#xA0;<xsl:value-of select="address"/>
Индекс: <xsl:value-of select="index"/>
<xsl:if test="phone!=''">
Телефон: <xsl:value-of select="phone"/></xsl:if>
</xsl:template>

<!-- Данные о товарах -->
<xsl:template match="items_order">
<xsl:variable name="quantity"><xsl:value-of select="order_items_quantity"/></xsl:variable>
<xsl:variable name="price"><xsl:value-of select="order_items_price"/></xsl:variable>
<xsl:value-of select="order_items_name"/>&#xA0;<xsl:value-of select="$quantity"/>&#xA0;<xsl:value-of select="item/mesure"/> * <xsl:value-of select="$price"/> = <xsl:value-of select="$quantity*$price"/>&#xA0;<xsl:value-of select="//order_list/currency/currency_name"/>
<xsl:if test="item/path != ''">&#xA0;http://<xsl:value-of select="//order_list/shop/site_alias_name"/><xsl:value-of select="//order_list/shop/shop_path"/><xsl:value-of select="item/fullpath"/><xsl:value-of select="item/path"/>/</xsl:if>&#xA0;
</xsl:template>

</xsl:stylesheet>