-
Notifications
You must be signed in to change notification settings - Fork 0
/
to_info_md_snippet.xsl
40 lines (37 loc) · 1.46 KB
/
to_info_md_snippet.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common" exclude-result-prefixes="exsl">
<xsl:import href="to_commons.xsl"/>
<xsl:output method="text"/>
<!-- parameters -->
<xsl:param name="extension"/>
<xsl:param name="info-file"/>
<xsl:param name="temp-dir"/>
<!-- table of languages with their file associations -->
<xsl:template match="/">
<table>
<xsl:call-template name="to-model">
<xsl:with-param name="extension" select="$extension"/>
<xsl:with-param name="info-file" select="$info-file"/>
<xsl:with-param name="temp-dir" select="$temp-dir"/>
</xsl:call-template>
</table>
</xsl:template>
<xsl:template match="language[not(@ignore) and not(../*[@issues and not(@ignore)])]" mode="model">
<xsl:text>| </xsl:text>
<xsl:choose>
<xsl:when test="@href">
<xsl:text>[</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>](</xsl:text>
<xsl:value-of select="@href"/>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> | </xsl:text>
<xsl:value-of select="@file-associations"/>
<xsl:text> |
</xsl:text>
</xsl:template>
</xsl:stylesheet>