Mercurial > hg > nginx-site
diff xslt/menu.xslt @ 694:2ced25001893
Regenerated.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 01 Oct 2012 13:50:19 +0000 |
parents | ba913f7cf7c1 |
children | b133b1f44765 |
line wrap: on
line diff
--- a/xslt/menu.xslt Fri Sep 28 11:14:47 2012 +0000 +++ b/xslt/menu.xslt Mon Oct 01 13:50:19 2012 +0000 @@ -22,41 +22,82 @@ </xsl:when> <xsl:otherwise> + <xsl:choose> - <a> - - <xsl:attribute name="href"> + <xsl:when test="@switchlang != ''"> <xsl:choose> - <xsl:when test="starts-with(@href, $DIRNAME)"> - <xsl:choose> + <xsl:when test="contains($TRANS, @switchlang)"> + + <a> - <xsl:when test="substring-after(@href, $DIRNAME) = ''"> - ./</xsl:when> + <xsl:attribute name="href"> + <xsl:choose> + + <xsl:when test="$ROOT != '' "> - <xsl:otherwise> + <xsl:value-of select=" concat($ROOT, '/', @switchlang, '/', $NOLANGORIGIN)"/> + </xsl:when> + + <xsl:otherwise> - <xsl:value-of select=" substring-after(@href, $DIRNAME)"/> - </xsl:otherwise> - </xsl:choose> + <xsl:value-of select=" concat(@switchlang, '/', $NOLANGORIGIN)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:value-of select=" normalize-space(text())"/> + + </a> </xsl:when> <xsl:otherwise> - <xsl:value-of select=" concat($ROOT, @href)"/> + <a class="notrans"> + <xsl:value-of select=" normalize-space(text())"/> + </a> </xsl:otherwise> </xsl:choose> - </xsl:attribute> + </xsl:when> + + <xsl:otherwise> + + <a> - <xsl:value-of select=" normalize-space(text())"/> + <xsl:attribute name="href"> + <xsl:choose> - </a> + <xsl:when test="starts-with(@href, $DIRNAME)"> + <xsl:choose> + + <xsl:when test="substring-after(@href, $DIRNAME) = ''"> + ./</xsl:when> + + <xsl:otherwise> - <xsl:if test="@lang"> - <xsl:text> [</xsl:text> - <xsl:value-of select="@lang"/> - <xsl:text>]</xsl:text> - </xsl:if> + <xsl:value-of select=" substring-after(@href, $DIRNAME)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:otherwise> + + <xsl:value-of select=" concat($ROOT, @href)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + + <xsl:value-of select=" normalize-space(text())"/> + + </a> + + <xsl:if test="@lang"> + <xsl:text> [</xsl:text> + <xsl:value-of select="@lang"/> + <xsl:text>]</xsl:text> + </xsl:if> + </xsl:otherwise> + </xsl:choose> <br/> </xsl:otherwise> @@ -109,4 +150,4 @@ <br/> </xsl:template> -</xsl:stylesheet> +</xsl:stylesheet> \ No newline at end of file