Xpoint
   [напомнить пароль]

Рекурсия в XSLT

Метки: [без меток]
2007-05-04 17:20:01 [обр] Юрий[досье]

Как это реализовать рекурсивно:

<blockquote>
<xsl:for-each select="cms/modules/mig/map/link">
   <xsl:value-of select="@value"/>
   <blockquote>
   <xsl:for-each select="link">
      <xsl:value-of select="@value"/>
      <blockquote>
      <xsl:for-each select="link">
      <xsl:value-of select="@value"/>
         <blockquote>
         <xsl:for-each select="link">
            <xsl:value-of select="@value"/>
            <blockquote>
            <xsl:for-each select="link">
               <xsl:value-of select="@value"/>
               <blockquote>
               <xsl:for-each select="link">
                  <xsl:value-of select="@value"/>
               </xsl:for-each>
               </blockquote>
            </xsl:for-each>
            </blockquote>
         </xsl:for-each>
         </blockquote>
      </xsl:for-each>
      </blockquote>
   </xsl:for-each>
   </blockquote>
</xsl:for-each>
</blockquote>

???

спустя 20 минут [обр] Dennis F. Latypoff aka funky_dennis(3/78)[досье]
<xsl:template match="cms/modules/mig/map">
  <xsl:apply-templates />
</xsl:apply-templates>

<xsl:template match="link">
  <blockquote>
    <xsl:value-of select="@value" />
    <xsl:apply-templates />
  </blockquote>
</xsl:template>
?
спустя 11 минут [обр] Dennis F. Latypoff aka funky_dennis(3/78)[досье]
<xsl:template match="cms/modules/mig/map">
  <xsl:apply-templates mode="link" />
</xsl:template>

<xsl:template match="link" mode="link">
  <blockquote>
    <xsl:value-of select="@value" />
    <xsl:apply-templates mode="link" />
  </blockquote>
</xsl:template>
так лучше будет.
спустя 3 дня [обр] Юрий[досье]
большое спасибо
Powered by POEM™ Engine Copyright © 2002-2005