Mercurial > hg > nginx-site
diff xslt/link.xslt @ 1156:8e8a6a7cff2b
Added variables index.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 16 Apr 2014 14:22:51 +0400 |
parents | c454373427ef |
children | 7e662eae0429 |
line wrap: on
line diff
--- a/xslt/link.xslt Wed Apr 16 13:55:53 2014 +0400 +++ b/xslt/link.xslt Wed Apr 16 14:22:51 2014 +0400 @@ -4,7 +4,7 @@ Copyright (C) Nginx, Inc. --> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:math="http://exslt.org/math" extension-element-prefixes="math"> <xsl:template match="img"> <img src="{@href}"> <xsl:apply-templates/> </img> </xsl:template> @@ -57,4 +57,16 @@ </xsl:for-each> </xsl:template> +<xsl:template match="varlinks"> + <xsl:for-each select="link"><xsl:sort select="@id"/> + <a href="{substring-before(@doc, '.xml')}.html#{@id}"><xsl:apply-templates/></a> + <xsl:if test="count(../link[@id = current()/@id and @doc != current()/@doc]) > 0"> + <xsl:text> (</xsl:text> + <xsl:value-of select="substring-before(substring-after(@doc, '/'), '.xml')"/> + <xsl:text>)</xsl:text> + </xsl:if> + <br/> + </xsl:for-each> +</xsl:template> + </xsl:stylesheet>