-
Notifications
You must be signed in to change notification settings - Fork 3
/
iso_639.xsl
33 lines (31 loc) · 1.02 KB
/
iso_639.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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:text>#include "tv_grab_dvb.h"
const struct lookup_table languageid_table[] = {
</xsl:text>
<xsl:for-each select="/iso_639_entries/iso_639_entry[@iso_639_1_code]">
<xsl:text> {{.c="</xsl:text>
<xsl:value-of select="@iso_639_2B_code"/>
<xsl:text>"}, "</xsl:text>
<xsl:value-of select="@iso_639_1_code"/>
<xsl:text>"},
</xsl:text>
<xsl:if test="@iso_639_2B_code != @iso_639_2T_code">
<xsl:text> {{.c="</xsl:text>
<xsl:value-of select="@iso_639_2T_code"/>
<xsl:text>"}, "</xsl:text>
<xsl:value-of select="@iso_639_1_code"/>
<xsl:text>"},
</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text> {{-1}, NULL},
};
</xsl:text>
</xsl:template>
</xsl:stylesheet>
<!-- vim: autoindent smartindent tabstop=2 shiftwidth=2 expandtab
-->