O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating XML

So far, we've seen how you can use templates to insert new information, such as HTML tags, into the content of your XML documents. There are also some ways in which we can actually use XSLT to write elements and attributes into the output, effectively changing the XSL from one vocabulary to another.

xsl:element

The xsl:element element enables you to use a template to create a new element in your output. The element element takes three attributes:

  • name— The name attribute allows you to specify the name of the element. This either can be a straightforward name, or it can take the form of an expression. This provides you with the power to generate dynamic names for your elements based on the content of the XML document being processed. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required