| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| <xsl:output method="html"/> |
| <xsl:apply-templates select="topic"> |
| <xsl:sort select="order" data-type="number" order="descending"/> |
| <xsl:template match="topic"> |
| <object type="text/sitemap"> |
| <xsl:element name="param"> |
| <xsl:attribute name="name">Name</xsl:attribute> |
| <xsl:attribute name="value"><xsl:value-of select="title" /></xsl:attribute> |
| <xsl:element name="param"> |
| <xsl:attribute name="name">Local</xsl:attribute> |
| <xsl:attribute name="value"><xsl:value-of select="id" />.html</xsl:attribute> |
| <xsl:apply-templates select="topic" /> |
| <!-- If a topic doesn't have a title, we pretend it isn't there and hoist its children up in its place --> |
| <xsl:template match="topic[not(title)]"> |
| <xsl:apply-templates select="topic"> |
| <xsl:sort select="order" data-type="number" order="descending"/> |