Home > Articles > Web Services > XML

  • Print
  • + Share This


Question: Is it possible to use the <xsl:otherwise> element as the false alternative to an <xsl:if> element?

Answer: No, the <xsl:otherwise> element is used inside an <xsl:choose> wrapper in conjunction with one or more <xls:when> elements.

Question: If a JavaScript function is written using the <xls:script> tag, can it be placed inside a template if it's to be called from other templates?

Answer: No. The <xls:script> tag is used to define global entities, so if you want the function to be globally accessible, it cannot be defined locally.

Question: What's the main advantage of using a set of <xls:when> elements rather than a set of <xls:if> elements?

Answer: The <xls:when> elements allow for the <xsl:otherwise> or "none of the above" option. Because the available options may expand or be combined, there's greater flexibility when you use <xls:when>.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.