SORU
29 Kasım 2012, PERŞEMBE


Nasıl if-else deyimi XSLT uygulamak için?

XSLT if-else deyimi kullanmaya çalışıyorum ama benim kod sadece ayrıştırmak değil. Herkes herhangi bir fikir var mı?

  <xsl:variable name="CreatedDate" select="@createDate"/>
  <xsl:variable name="IDAppendedDate" select="2012-01-01" />
  <b>date: <xsl:value-of select="$CreatedDate"/></b> 

  <xsl:if test="$CreatedDate > $IDAppendedDate">
    <h2> mooooooooooooo </h2>
  </xsl:if>
  <xsl:else>
    <h2> dooooooooooooo </h2>
  </xsl:else>

CEVAP
29 Kasım 2012, PERŞEMBE


Bunu yeniden gerçeklemek <xsl:choose> etiketi kullanma:

       <xsl:choose>
         <xsl:when test="$CreatedDate > $IDAppendedDate">
           <h2> mooooooooooooo </h2>
         </xsl:when>
         <xsl:otherwise>
          <h2> dooooooooooooo </h2>
         </xsl:otherwise>
       </xsl:choose>

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • 1881 Animation

    1881 Animati

    5 EKİM 2013
  • Bryan Adams

    Bryan Adams

    30 Mart 2006
  • gamingbits

    gamingbits

    2 Mayıs 2006