Skip to main content

XSLT Elements Reference

The XSLT elements from the W3C Recommendation (XSLT Version 1.0).

XSLT Elements

note

Click on the Element name to view more information about each specific element.

ElementDescription
apply-importsApplies a template rule from an imported style sheet
apply-templatesApplies a template rule to the current element or to the current element's child nodes
attributeAdds an attribute
attribute-setDefines a named set of attributes
call-templateCalls a named template
chooseUsed in conjunction with <when> and <otherwise> to express multiple conditional tests
commentCreates a comment node in the result tree
copyCreates a copy of the current node (without child nodes and attributes)
copy-ofCreates a copy of the current node (with child nodes and attributes)
decimal-formatDefines the characters and symbols to be used when converting numbers into strings, with the format-number() function
elementCreates an element node in the output document
fallbackSpecifies an alternate code to run if the processor does not support an XSLT element
for-eachLoops through each node in a specified node set
ifContains a template that will be applied only if a specified condition is true
importImports the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet
includeIncludes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet
keyDeclares a named key that can be used in the style sheet with the key() function
messageWrites a message to the output (used to report errors)
namespace-aliasReplaces a namespace in the style sheet to a different namespace in the output
numberDetermines the integer position of the current node and formats a number
otherwiseSpecifies a default action for the <choose> element
outputDefines the format of the output document
paramDeclares a local or global parameter
preserve-spaceDefines the elements for which white space should be preserved
processing-instructionWrites a processing instruction to the output
sortSorts the output
strip-spaceDefines the elements for which white space should be removed
stylesheetDefines the root element of a style sheet
templateRules to apply when a specified node is matched
textWrites literal text to the output
transformDefines the root element of a style sheet
value-ofExtracts the value of a selected node
variableDeclares a local or global variable
whenSpecifies an action for the <choose> element
with-paramDefines the value of a parameter to be passed into a template

Table of Contents