Skip to Content
XSLT
book

XSLT

by Doug Tidwell
August 2001
Intermediate to advanced
480 pages
11h 16m
English
O'Reilly Media, Inc.
Content preview from XSLT

How Do I Implement an if-else Statement?

For whatever reason, XSLT doesn’t provide an <xsl:else> element. To create an if-else statement, you need an <xsl:choose> element with a single <xsl:when> element and a single <xsl:otherwise> element. If the test attribute of the <xsl:when> element is true, then the contents of the <xsl:when> are evaluated; if not, the contents of the <xsl:otherwise> element are.

See the <xsl:choose> entry in Appendix A for a complete discussion of this element and some examples.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning XSLT

Learning XSLT

Michael Fitzgerald
Inside XSLT

Inside XSLT

Steven Holzner
XSLT Cookbook

XSLT Cookbook

Sal Mangano

Publisher Resources

ISBN: 0596000537Supplemental ContentCatalog PageErrata