Editing the Template That Matches the Root Node

This topic is part of a sequence that starts with Creating a New Sample Stylesheet.

Begin writing your stylesheet by adding instructions to the template that explicitly matches the root node in your source document:

In the XSLT editor, edit the contents of the root template so that it contains only the following contents. As you type, Stylus Studio displays a pop-up menu that lists possible instructions. You can scroll the list and double-click the entry you want, or you can continue typing. If you want, you can copy the text from here and paste it into the Templates view.

<html>
               
<body>
               
<h3><center>Books in Stock</center></h3>
               
<table align="center" cellpadding="5">
               
  <tr>
               
    <th>Title</th>
               
    <th>Author</th>
               
    <th>Price</th>
               
  </tr>
               
<xsl:apply-templates select="bookstore/book"/>
               
</table>
               
</body>
               
</html>
               

            

Ensure that you do one of the following:

  • Remove the xsl:apply-templates instruction that you inserted earlier.
  • Edit the xsl:apply-templates instruction to include the select attribute as shown above, and place it in the correct location.

XPath Editor

Stylus Studio's intelligent code-sensing, auto-completion technology, Sense:X, is XPath-aware. You'll find Sense:X for XPath in all of Stylus Studio's editors, including the XML Editor, XSLT Editor, and XQuery Editor.

Switch to Stylus Studio: Customer Testimonials

Read in their own words, why customers have decided to make the switch to Stylus Studio, the World's best XML editor.

ADO to XML

The Stylus Studio ADO to XML data coversion wizard simplifies extracting of relational data into any XML format.

Web Service Standards

Stylus Studio supports Web service standards including WSDL, UDDI and SOAP. The Web Service Tester lets you easily develop and leverage Web services in your XML applications.

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.