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 FOP

Apache FOP is an open-source engine is available from the Apache project that renders XSL-FO into PDF and other popular document formats. Apache FOP is fully integrated with Stylus Studio's XSL:FO tools.

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.

Text File to XML

Stylus Studio provides several easy-to-use document wizards that allow you to quickly convert text files to XML. Create XML from text and EDI, create XML Schema from EDIFACT, and more!

XML Schema Designer

The XML Schema Designer is a tool for accelerating advanced XML Schema development through an intuitive visual interface for modeling any XML data structures.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member