Easy Tutorial
❮ El Param El Key ❯

XSLT <xsl:element> Element



Definition and Usage

The <xsl:element> element is used to create element nodes in the output document.


Syntax

Attributes

Attribute Value Description
name name Required. Specifies the name of the element to be created. (An expression can be used to assign a value to the name attribute, which is evaluated at runtime, e.g., &lt;xsl:element name="{$country}" />)
namespace URI Optional. Specifies the namespace URI of the element. (An expression can be used to assign a value to the namespace attribute, which is evaluated at runtime, e.g., &lt;xsl:element name="{$country}" namespace="{$someuri}"/>)
use-attribute-sets namelist Optional. A space-separated list of attribute sets that contain attributes to be added to the element.

Example 1

Create an element named "singer" that contains the value of each artist element:

View XML File, View XSL File, View Result.

❮ El Param El Key ❯