You need to add the namespace prefix to your select.
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://docbook.org/ns/docbook">
<xsl:template match="/">
<html>
<head>
<title></title>
</head>
<body>
<xsl:apply-templates select="//ns:para">
<xsl:sort select="." order="descending"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<xsl:template match="ns://para">
<h1><xsl:apply-templates select="text()"/></h1>
</xsl:template>
</xsl:stylesheet>
If your two stylesheets just vary by the sort order attribute it would be more elegant to use a parameter:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://docbook.org/ns/docbook">
<xsl:variable name="sortOrder" select="'ascending'"/>
<xsl:template match="/">
<html>
<head>
<title></title>
</head>
<body>
<xsl:apply-templates select="//ns:para">
<xsl:sort select="." order="{$sortOrder}"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<xsl:template match="ns://para">
<h1><xsl:apply-templates select="text()"/></h1>
</xsl:template>
</xsl:stylesheet>
You can then modify the parameter before transforming if you need descending.
--
Joe (
Microsoft MVP - XML)