<?xml version="1.0" encoding='ISO-8859-1'?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name='modo' />
<xsl:output encoding='iso-8859-1' />
<xsl:template match='raiz'>
<xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction>
<html>
<head><title>Ordenando</title></head>
<body>
Mode: <xsl:value-of select='$modo' />
<ol>
	<xsl:choose>
		<xsl:when test='$modo = verbose'>
			<xsl:apply-templates select='cosa' mode='verbose'>
				<xsl:sort select='.' data-type='text'/>
			</xsl:apply-templates><br />
		</xsl:when>
		<xsl:otherwise>
			<xsl:apply-templates select='cosa' mode='normal'>
				<xsl:sort select='.' data-type='text'/>
			</xsl:apply-templates><br />
		</xsl:otherwise>
	</xsl:choose>
</ol>
</body>
</html>
</xsl:template>

<xsl:template match='cosa' mode='normal'>
<li><xsl:value-of select='.'/></li>
</xsl:template>

<xsl:template match='cosa' mode='verbose'>
<li>Nombre: <xsl:value-of select='.'/></li>
</xsl:template>

</xsl:stylesheet>
