Name
<xsl:element>
Allows you to create an element in the output document.
It works similarly to the <xsl:attribute> element.
Category
Instruction.
Required Attribute
nameDefines the name of this element. A value of
name="Fred"produces a<Fred>element in the output document.
Optional Attributes
namespaceDefines the namespace used for this element.
use-attribute-setsLists one or more attribute sets that should be used by this element. If you specify more than one attribute set, separate their names with whitespace characters.
- [2.0]
inherit-namespaces Defines whether this element and its children inherit the current namespace nodes. Valid values are
yes(the default) andno.- [2.0 – Schema]
type Defines the datatype of this element. The datatype can be any of the built-in datatypes or it can be a datatype defined in a schema if you have a schema-aware XSLT 2.0 processor.
The
typeandvalidationattributes are mutually exclusive.- [2.0 – Schema]
validation Defines how the value of the new element will be validated. The
validationattribute has four values:strict,lax,preserve, orstrip.validation="strict"means that the XSLT processor looks in all the declared schemas for an element declaration (<xs:element>) with the same name as this element. If the processor can’t find a matching<xs:element>, it is a fatal error. Assuming the processor finds the declaration of the element, it validates the generated element’s value against its declaration.validation="lax"works just likevalidation="strict" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access