html and xhtml and my stylesheet!?

John S

New member
need to have my xml stylesheet output xhtml, but I think it only outputs html, how do I change this?
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="Information">
<html>
<head>
<title>Books</title>
</head>
<body>
<h1>Book Information</h1>
<table border="1">
<th>Name</th>
<th>Author</th>
<th>Title</th>
<th>Year</th>
<th>Pages</th>
<xsl:apply-templates>
<xsl:sort select="author" order="descending"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>


<xsl:template match="Article|InProceedings">
<tr>
<td>
<xsl:value-of select="name"/>
</td>
<td>
<xsl:value-of select="authors/Author[position()='1']"/>
<xsl:choose>
<xsl:when test="count(authors/Author) ='1'">
<xsl:text/>
</xsl:when>
<xsl:otherwise>
<xsl:text>and others</xsl:text>
</xsl:otherwise>
</xsl:choose>
</td>

<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:value-of select="year"/>
</td>
<td>
<xsl:value-of select="pages"/>
</td>
</tr>
</xsl:template>




</xsl:stylesheet>
 
Back
Top