
Extensible Stylesheet Language (XSL) • 267
6.4.2 Creating Elements and Attributes
Thus far, we have concentrated on applying stylesheets to XML documents with the aim of matching element
or attribute names, and formatting the output. XSLT can be used for many other purposes. In this section, we
shall study how to add new elements and attributes to the output using XSLT.
Consider an XML document as shown in Figure 6.30. We will use this example to introduce a new
concept of XSLT processing using the parsing technology.
<?xml version="1.0"?>
<students>
<student rst_name="Raju">
<id>101</id>
<remarks> A student who is not at all sincere!</remarks> ...