Mercurial > hg > nginx-site
view xslt/dirmap.xslt @ 1540:6866a74393e0
Added a hint about xslt transformation to autoindex_format.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 24 Dec 2014 12:50:29 +0300 |
parents | 4011ba8fdf30 |
children |
line wrap: on
line source
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) Nginx, Inc. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:strip-space elements="*"/> <xsl:template match="link"> <xsl:value-of select="@id"/> <xsl:text> </xsl:text> <xsl:value-of select="substring-before(@doc, '.xml')"/> <xsl:text>.html#</xsl:text> <xsl:value-of select="@id"/> <xsl:text>; </xsl:text> </xsl:template> <xsl:template match="link[@id = 'include']"> <xsl:text>\</xsl:text> <xsl:value-of select="@id"/> <xsl:text> </xsl:text> <xsl:value-of select="substring-before(@doc, '.xml')"/> <xsl:text>.html#</xsl:text> <xsl:value-of select="@id"/> <xsl:text>; </xsl:text> </xsl:template> <xsl:template match="link[starts-with(@id, 'var_')]"> <xsl:text>$</xsl:text> <xsl:value-of select="substring-after(@id, 'var_')"/> <xsl:text> </xsl:text> <xsl:value-of select="substring-before(@doc, '.xml')"/> <xsl:text>.html#</xsl:text> <xsl:value-of select="@id"/> <xsl:text>; </xsl:text> </xsl:template> <xsl:template match="links | varlinks"> <xsl:for-each select="link"><xsl:sort select="@id"/> <xsl:if test="count(preceding-sibling::link[@id = current()/@id]) = 0"> <xsl:apply-templates select="."/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>