Elementin <xsl:fallback> na XSLT

Tasiri da Amfani

Elementin <xsl:fallback> za a nufin koda a zai a cikin XSL akaiya XSL element (wanda ake cikin hanyar), za a yi a yi koda na girmama:

Tsarin

<xsl:fallback>
<!-- Content: template -->
</xsl:fallback>

Siffa

Ba sha

Mafi

Yanar 1

Iya ce kanan yana za a yi wakilci <xsl:loop> dona za a kaiya baiya "title" yanki. Idan abin sha XSL akaiya a cikin tsarin XSL (wanda ake cikin hanyar), za a yi a yi <:xsl:for-each> yanki dona ya:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="catalog/cd">  
  <xsl:loop select="title">  
    <xsl:fallback>
      <xsl:for-each select="title">  
        <xsl:value-of select="."/>
      </xsl:for-each>  
    </xsl:fallback>  
  </xsl:loop>
</xsl:template>
</xsl:stylesheet>