comparison xslt/directive.xslt @ 171:6eeaa9e1f3b5

Made "appeared-in" an element, and added support for multiple "appeared-in" specifications.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 03 Nov 2011 21:40:27 +0000
parents cd2698ea00ab
children 13f4de67fbb6
comparison
equal deleted inserted replaced
170:cd2698ea00ab 171:6eeaa9e1f3b5
16 16
17 <xsl:apply-templates select="context"/> 17 <xsl:apply-templates select="context"/>
18 18
19 </table> 19 </table>
20 20
21 <xsl:if test="(@appeared-in)"> 21 <xsl:apply-templates select="appeared-in"/>
22
23 <p>This directive appeared in version
24 <xsl:value-of select="@appeared-in"/>.
25 </p>
26 </xsl:if>
27 22
28 </div> 23 </div>
29 24
30 <xsl:apply-templates select="para"/> 25 <xsl:apply-templates select="para"/>
31 </xsl:template> 26 </xsl:template>
197 </xsl:text> 192 </xsl:text>
198 </xsl:otherwise> 193 </xsl:otherwise>
199 </xsl:choose> 194 </xsl:choose>
200 </xsl:template> 195 </xsl:template>
201 196
197 <xsl:template match="appeared-in">
198 <xsl:choose>
199
200 <xsl:when test="last() = 1">
201
202 <p>This directive appeared in version
203 <xsl:apply-templates/>.
204 </p>
205 </xsl:when>
206
207 <xsl:otherwise>
208
209 <xsl:choose>
210 <xsl:when test="position() = 1">
211 <xsl:text disable-output-escaping="yes">
212 &lt;p&gt;
213 </xsl:text>
214 This directive appeared in versions
215 <xsl:apply-templates/>
216 <xsl:if test="last() &gt; 2">
217 <xsl:text>, </xsl:text>
218 </xsl:if>
219 </xsl:when>
220 <xsl:when test="position() != last()">
221 <xsl:apply-templates/>
222 <xsl:text>, </xsl:text>
223 </xsl:when>
224 <xsl:otherwise>
225 and
226 <xsl:apply-templates/>.
227 <xsl:text disable-output-escaping="yes">
228 &lt;/p&gt;
229 </xsl:text>
230 </xsl:otherwise>
231 </xsl:choose>
232 </xsl:otherwise>
233 </xsl:choose>
234 </xsl:template>
235
202 </xsl:stylesheet> 236 </xsl:stylesheet>