にーとがひまつぶしに実験したので間違えてる可能性大ですが
こう書くとエラー無くそれらしく表示されました
<xsl:template match="table">
<body>
<h2>Test</h2>
<xsl:apply-templates>
<xsl:sort select="bookCode/price" order="ascending"/>
</xsl:apply-templates>
</body>
</xsl:template>