Answers for "xslt if"

0

xslt if

<table>

            <tr>
            
            <td bgcolor="#9966ff"><h2>Computador com promoção abaixo de 10%</h2></td>
            <xsl:for-each select="loja/produto/computador">
            
            <td><b><xsl:value-of select="tipo"/></b>
                <ul>
                    <li><b>Modelo: </b>  <xsl:value-of select="so"/></li>
                    <li><b>Modelo: </b><xsl:value-of select="modelo"/></li>
                    <li><b>Cor: </b><xsl:value-of select="cor"/></li>
                    <xsl:if test= "promocao &lt; 10">
                    <li  bgcolor="#ffff80"><b>Promo: </b><xsl:value-of select="promocao"/>%</li></xsl:if>
                    <li><b>Preço: </b><xsl:value-of select="preco"/>€</li>
                    <li><b>Stock: </b><xsl:value-of select="stock"/></li>
                    <li><b>Classificação: </b><xsl:value-of select="reviews"/></li>
                    <li><b>Armazenamento: </b><xsl:value-of select="armazenamento"/></li>
                    <li><b>Gráfica: </b><xsl:value-of select="grafica"/></li>
                    <li><b>Processador: </b><xsl:value-of select="processador"/></li>
                    <li><b>Garantia: </b><xsl:value-of select="garantia"/></li>
                    
                </ul>
            
            </td>
            
            </xsl:for-each>
            
            </tr>

        </table>
Posted by: Guest on July-27-2021

Browse Popular Code Answers by Language