comparison xslt/directive.xslt @ 177:13f4de67fbb6

Added i18n support for multiple <appeared-in> inside <directive>.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 14 Nov 2011 13:14:48 +0000
parents 6eeaa9e1f3b5
children c454373427ef
comparison
equal deleted inserted replaced
176:0883fc5aabc9 177:13f4de67fbb6
197 <xsl:template match="appeared-in"> 197 <xsl:template match="appeared-in">
198 <xsl:choose> 198 <xsl:choose>
199 199
200 <xsl:when test="last() = 1"> 200 <xsl:when test="last() = 1">
201 201
202 <p>This directive appeared in version 202 <p>
203
204 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item [@id='directive.version']"/>
205
206 <xsl:text> </xsl:text>
207
203 <xsl:apply-templates/>. 208 <xsl:apply-templates/>.
209
204 </p> 210 </p>
205 </xsl:when> 211 </xsl:when>
206 212
207 <xsl:otherwise> 213 <xsl:otherwise>
208 214
209 <xsl:choose> 215 <xsl:choose>
210 <xsl:when test="position() = 1"> 216 <xsl:when test="position() = 1">
211 <xsl:text disable-output-escaping="yes"> 217 <xsl:text disable-output-escaping="yes">
212 &lt;p&gt; 218 &lt;p&gt;
213 </xsl:text> 219 </xsl:text>
214 This directive appeared in versions 220 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item [@id='directive.versions']"/>
221 <xsl:text> </xsl:text>
215 <xsl:apply-templates/> 222 <xsl:apply-templates/>
216 <xsl:if test="last() &gt; 2"> 223 <xsl:if test="last() &gt; 2">
217 <xsl:text>, </xsl:text> 224 <xsl:text>,</xsl:text>
218 </xsl:if> 225 </xsl:if>
226 <xsl:text> </xsl:text>
219 </xsl:when> 227 </xsl:when>
220 <xsl:when test="position() != last()"> 228 <xsl:when test="position() != last()">
221 <xsl:apply-templates/> 229 <xsl:apply-templates/>
222 <xsl:text>, </xsl:text> 230 <xsl:text>, </xsl:text>
223 </xsl:when> 231 </xsl:when>
224 <xsl:otherwise> 232 <xsl:otherwise>
225 and 233 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item [@id='and']"/>
234 <xsl:text> </xsl:text>
226 <xsl:apply-templates/>. 235 <xsl:apply-templates/>.
227 <xsl:text disable-output-escaping="yes"> 236 <xsl:text disable-output-escaping="yes">
228 &lt;/p&gt; 237 &lt;/p&gt;
229 </xsl:text> 238 </xsl:text>
230 </xsl:otherwise> 239 </xsl:otherwise>