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.

Apache XML Project

The Apache XML Project provides standards-based, open-source XML solutions for working with W3C XML technologies including XML, XSL, XSLT, XSL:FO XPath, Web services and more. Learn how Stylus Studio provides support for all Apache XML projects.

Data Integration Tools: Using the Stylus Studio XML Pipeline to Visually Integrate and Publish Data

Data Integration Tools from Stylus Studio include a visual pipeline editor, support for non-XML data sources, scalable data integration components, cross-language debugging and Java code generation. Try it now.

XQuery Tools Support for TigerLogic XDMS

Stylus Studio's integration with the TigerLogic XDMS XQuery processor, allowing you to execute advanced XQuery expressions directly against any TigerLogic XDMS instance.

XML Schema Tutorial

An XML Schema Tutorial that explores real-world XML Schema development issues, XML Schema examples and various use cases.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member