Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XSLT Element

XSLT xsl:element Element


XSLT Element Reference Manual Complete XSLT Element Reference Manual


Definition and Usage

xsl:element element is used to create an element node in the output document.


Syntax

name="name"

namespace="URI"

use-attribute-sets="namelist">

property

property Value Description
name name Required. Specifies the name of the element to create. (An expression can be used to assign a value to the name attribute; this expression is evaluated at runtime, for example:)
namespace URI Optional. Specifies the namespace URI of the element. (An expression can be used to assign a value to the namespace attribute; this expression is evaluated at runtime, for example:)
use-attribute-sets namelist Optional. A space-separated list of attribute sets that contain the attributes to add to the element.

Example 1

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

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


View the XML file、 View the XSL file、 View the result。


XSLT Element Reference Manual Complete XSLT Element Reference Manual