Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Старожил


Сообщения: 236
Благодарности: 0

Профиль | Отправить PM | Цитировать


Vlad Drakula

вот мой код:

PHP код: Выделить весь код

<?xml version="1.0" encoding="windows-1251"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="page">
        <form method="post">
<xsl:element name="input" use-attribute-sets="input_update"/>
        </form>
    </xsl:template>
    
    <xsl:attribute-set name="input_update">
        <xsl:attribute name="checked"/>
        <xsl:attribute name="name">update</xsl:attribute>
        <xsl:attribute name="value">1</xsl:attribute>
        <xsl:attribute name="type">checkbox</xsl:attribute>
    </xsl:attribute-set>
</xsl:stylesheet>

вы предлагаете:

PHP код: Выделить весь код

<?xml version="1.0" encoding="windows-1251"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="page">
        <form method="post">
<xsl:element name="input" use-attribute-sets="input_update"/>
        </form>
    </xsl:template>
    
    <xsl:attribute-set name="input_update">
<xsl:if test="./item[text() = '1']">
        <xsl:attribute name="checked"/>
</xsl:if>
        <xsl:attribute name="name">update</xsl:attribute>
        <xsl:attribute name="value">1</xsl:attribute>
        <xsl:attribute name="type">checkbox</xsl:attribute>
    </xsl:attribute-set>
</xsl:stylesheet>

ваш вариант - не работает

Отправлено: 21:21, 03-05-2007 | #228