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

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

Аватара для hasherfrog

Старый параноик


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

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


Всё, спасиб, решил.
PHP код: Выделить весь код

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" standalone="yes"/>

<xsl:template match="*">
<html><head></head><body>
<xsl:apply-templates mode="line"/>
</body></html>
</xsl:template>

<xsl:template match="*" mode="line">
<div>
<xsl:call-template name="graft"/>
<xsl:apply-templates select="." mode="item"/>
 <xsl:for-each select="@*">
<div>
 <xsl:call-template name="graft"/>
 <i>
 <xsl:value-of select="name()"/>
 <xsl:text> (attribute) </xsl:text>
 </i>
</div>
 </xsl:for-each>
<xsl:apply-templates mode="line"/>
</div>
</xsl:template>

<xsl:template match="*" mode="item">
<b><xsl:value-of select="name()"/></b>
</xsl:template>

<xsl:template name="graft">
<xsl:apply-templates select="ancestor::*" mode="tree"/>
&#хA0;
</xsl:template>

<xsl:template match="*" mode="tree">
&#хA0;
</xsl:template>

</xsl:stylesheet>


Отправлено: 16:06, 08-11-2006 | #2