fallback

XSLT <xsl:fallback> elementi


❮ To‘liq XSLT elementlari ma’lumotnomasi

Ta’rif va qo‘llanilishi

<xsl:fallback> elementi XSL protsessor biror XSL elementini qo‘llab-quvvatlamasa, bajariladigan muqobil kodni belgilaydi.


Sintaksis

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

Atributlar

Yo‘q

1-misol

Bu misol o‘ylab topilgan <xsl:loop> elementi yordamida har bir "title" elementi bo‘ylab sikl bajarishi kerak. Agar XSL protsessor bu elementni qo‘llab-quvvatlamasa (u qo‘llab-quvvatlamaydi ham), uning o‘rniga <:xsl:for-each> elementidan foydalanadi:

<?xml version="1.0" encoding="UTF-8"?> <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>

❮ To‘liq XSLT elementlari ma’lumotnomasi

W3Schools Pathfinder

Yutuqlaringizni kuzating – bu bepul!