XSLT tutoriallogin
XSLT tutorial
author:php.cn  update time:2022-04-20 15:02:22

XSLT elements


XSLT Element Reference Manual


XSLT elements derived from the W3C recommended standard (XSLT Version 1.0).


XSLT Elements

If you need more detailed information about the following elements, click on the links in the Elements column.

Element Description
apply-importsApply template rules from the imported stylesheet .
apply-templatesApply template rules to the current element or a child node of the current element.
attributeAdd attributes.
attribute-setDefine a named attribute set.
call-templateCall a specified template.
choose Used in conjunction with <when> and <otherwise> to express multiple condition tests.
commentCreate a comment node in the result tree.
copyCreate a copy of the current node (without child nodes and attributes).
copy-ofCreate a copy of the current node (with child nodes and attributes).
decimal-formatDefine the characters and symbols to be used when converting numbers to strings through the format-number() function.
elementCreate an element node in the output document.
fallback If the processor does not support an XSLT element, specify an alternative code to run.
for-eachLoop through each node in the specified node set.
if Contains a template that is applied only when a specified condition is true.
import is used to import the contents of one style sheet into another style sheet. Note: The imported style sheet has a lower priority than the exported style sheet.
includeInclude the contents of one style sheet into another style sheet. Notice: An included style sheet has the same priority as an included style sheet.
keyDeclares a named key that is used in the style sheet through the key() function.
messageWrite a message to the output (for reporting errors).
namespace-aliasReplace the namespace in the stylesheet with a different namespace in the output.
number Determine the integer position of the current node and format the number.
otherwiseSpecifies the default action of the <choose> element.
outputDefine the format of the output document.
paramDeclare a local or global parameter.
preserve-spaceDefine elements that preserve whitespace.
processing-instructionWrite a processing instruction to the output, that is, generate a processing instruction node.
sort Sort the output.
strip-space Defines elements from which whitespace characters should be removed.
stylesheet Define the root element of the style sheet.
templateThe rule to apply when the specified node is matched.
textWrite text to the output, that is, generate text nodes through the style sheet.
transform Define the root element of the style sheet.
value-ofExtract the value of the selected node.
variableDeclare local or global variables.
whenSpecifies the action of the <choose> element.
with-paramSpecifies the value of the parameter passed to the template.


php.cn