xsl:element

Adds an element to the result tree.

Format


              <xsl:element name="qualified_name
              ">
               

              
element_contents
                   

                
</xsl:element>

Description

The XSLT processor uses the contents of the xsl:element instruction as a template for the attributes and contents of the new element.

The prefix part of the name attribute becomes the prefix for the element you are creating. The local part of the name attribute becomes the local name of the element you are creating.

The XSLT processor interprets the name attribute as an attribute value template. The string that results from instantiating the attribute value template must be a qualified name. If it is not, the XSLT processor reports an error.

Example


              <xsl:element name="audio:CD">
               

              
<xsl:element name="audio:title">Celtic Airs</xsl:element>
                   
<xsl:element name="audio:artist">Chieftains</xsl:element>
                   

                
</xsl:element>

The result of this instruction looks like the following:

<audio:CD>
               

              
<audio:title>Celtic Airs</audio:title>
                   
<audio:artist>Chieftains</audio:artist>
                   

                
</audio:CD>

Validate XML Using XSD

You can validate XML documents against any data model defined using W3C XSD, using any major XSD Validator, including MSXML 3.0, MSXML 4.0, MSXML 6.0, Xerces-J, Xerces-C, Microsoft System.XML (1.0 and 2.0), XSV, the Saxonica XSD Validator and others.

EXSLT Tools

EXSLT support in Stylus Studio lets you extend XSLT 1.0 stylesheets and simplify many tasks including computing dates and times, performing mathematical computations, string manipulations and more.

Learn XSLT

Free online video demonstrations for learning XSLT and how to design XSLT stylesheets to convert XML to HTML in publishing applications, or how to convert HTML to XML.

Electronics & Electrical Equipment

Many electronics and electrical equipment companies need the most powerful XML IDE to power up their companies. Come see which electronics & electrical equipment companies are wired up with Stylus Studio 2006.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member