Creating a Template That Matches the author Element

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

To define a template that matches the author element:
1. In the XSLT editor source document tree pane, expand the book element.
2. Double-click the author element.

Stylus Studio creates a template that matches the author element, and places it near the end of the stylesheet.

3. In the XSLT editor pane view, edit the template body so that it contains only the following contents.
<xsl:value-of select="first-name"/>
               
&nbsp;
               
<xsl:value-of select="last-name"/>
               

            

If you do not include the nonbreaking space entity, the first name and the last name have no space between them. Press F5 to see the results of this change, as shown in Figure 208.

Figure 208. Result of XSLT with an Author Template

4. Save the stylesheet by clicking Save .
5. Close the stylesheet by clicking File > Close on the Stylus Studio menu bar.

Binary XML

How do I get my binary data into XML? How do I get my binary data out of XML? The answers to these questions and more in this amazing Binary XML tutorial.

XHTML Tools

Powerful XHTML Tools for converting HTML to XHTML, validating XHTML, transforming XML to XHTML, editing JSP, creating XML driven Websites and more.

Translating X12 Documents to XML

The X12 to XML Converter is a built-in function of the adapter library. The XML that is generated is well commented and indented, and can be used anywhere XML is normally used — with XML Schemas, XSLT, XQuery, etc.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member