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>
               

            

XML-to-HTML Mapper

Stylus Studio simplifies XML-to-HTML mapping through the industry's first and only XML to HTML mapping tool based on industry standard XSLT.

XHTML Tools

Powerful XHTML Tools for converting HTML to XHTML, validating XHTML, transforming XML to XHTML, editing JSP, creating XML driven Websites and more.

Join Us: Apply for a Job at Stylus Studio Today

Join our team of XML professionals and help us in our mission to create the most productive XML tools and components on the planet. Apply today!

WSDL Editor

WSDL Editor featuring a graphical WSDL viewer, syntax help, Java Web Service code generation and more. Simplify Web Services development with Stylus Studio's Web Service Description Language (WSDL) Editor today!

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.