nginx/docs/xslt/directive.xslt

103 lines
2.0 KiB
HTML
Raw Normal View History

2011-08-05 04:25:34 -05:00
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="directive">
2011-08-09 10:15:36 -05:00
<hr/>
<a name="{@name}"/>
<!-- <center><h4><xsl:value-of select="@name"/> </h4></center> -->
2011-08-09 10:15:36 -05:00
2011-08-05 04:25:34 -05:00
<xsl:apply-templates select="syntax"/>
2011-08-09 10:15:36 -05:00
2011-08-05 04:25:34 -05:00
<xsl:apply-templates select="default"/>
2011-08-09 10:15:36 -05:00
2011-08-05 04:25:34 -05:00
<xsl:apply-templates select="context"/>
2011-08-09 10:15:36 -05:00
<xsl:if test="(@appeared-in)">
<strong>appeared in version</strong>:
<xsl:value-of select="@appeared-in"/>
</xsl:if>
2011-08-05 04:25:34 -05:00
<xsl:apply-templates select="para"/>
</xsl:template>
2011-08-09 10:15:36 -05:00
2011-08-05 04:25:34 -05:00
<xsl:template match="syntax">
<xsl:choose>
<xsl:when test="position() = 1">
<strong>syntax</strong>:
</xsl:when>
<xsl:otherwise>
<code>       </code>
</xsl:otherwise>
</xsl:choose>
2011-09-06 05:42:17 -05:00
<code>
<xsl:apply-templates/>
</code>
2011-08-05 04:25:34 -05:00
<br/>
</xsl:template>
2011-08-09 10:15:36 -05:00
2011-08-05 04:25:34 -05:00
<xsl:template match="default">
<strong>default</strong>:
<xsl:choose>
<xsl:when test="count(text()) = 0">
<strong>none</strong>
</xsl:when>
<xsl:otherwise>
<code>
<xsl:apply-templates/>
</code>
</xsl:otherwise>
</xsl:choose>
2011-08-05 04:25:34 -05:00
<br/>
</xsl:template>
2011-08-09 10:15:36 -05:00
2011-08-05 04:25:34 -05:00
<xsl:template match="context">
<xsl:if test="position() = 1">
<strong>context</strong>:
</xsl:if>
<xsl:choose>
<xsl:when test="count(text()) = 0">
<strong>any</strong>
</xsl:when>
<xsl:otherwise>
<code>
<xsl:apply-templates/>
</code>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<br/>
</xsl:otherwise>
</xsl:choose>
2011-08-05 04:25:34 -05:00
</xsl:template>
2011-08-09 10:15:36 -05:00
</xsl:stylesheet>