Its just a problem with your stylesheet not matching what you expect it to match. The problem is that the line <xsl:for-each select="CATALOG/BOOK"> changes the context to each BOOK node in turn. Then you have <xsl:apply-templates/> with no select attribute so you get the default behaviour which is to apply templates to all child nodes of the context node (BOOK). The only child nodes are TITLE and AUTHOR which have no templates specified so again you get the default behaviour which is to output the text of each node. The BOOK template never gets called! So you end up with HTML like this for each BOOK:
<tr>Introduction to talking shyJohn Crop</tr>
This HTML has no <td> tags so the browser doesn't display it properly.
Try this instead:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<table>
<tr>
<td>Title</td>
<td>Author</td>
</tr>
<xsl:apply-templates select="CATALOG/BOOK"/>
</table>
</xsl:template>
<xsl:template match="BOOK">
<tr>
<td>
<xsl:value-of select="TITLE"/>
</td>
<td>
<xsl:value-of select="AUTHOR"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
hth
Phil