| Use case | Relevant XSLT elements |
|---|---|
| Creating nodes | xsl:element, xsl:attribute, xsl:text, xsl:comment, xsl:processing-instruction |
| Copying nodes | xsl:copy-of, xsl:copy |
| Repetition (looping) | xsl:for-each |
| Sorting | xsl:sort |
| Conditional processing | xsl:choose, xsl:if |
| Computing or extracting a value | xsl:value-of |
| Defining variables and parameters | xsl:variable, xsl:param |
| Defining and calling subprocedures (named templates) | xsl:template, xsl:call-template |
| Defining and applying template rules | xsl:template, xsl:apply-templates, xsl:apply-imports |
| Numbering and number formatting | xsl:number, xsl:decimal-format |
| Debugging | xsl:message |
| Combining stylesheets (modularization) | xsl:import, xsl:include |
| Compatibility | xsl:fallback |
| Building lookup indexes | xsl:key |
| XSLT code generation | xsl:namespace-alias |
| Output formatting | xsl:output |
| Whitespace stripping | xsl:strip-space, xsl:preserve-space |