4 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
5 <xsl:output method=
"text" encoding=
"UTF-8"/>
7 <xsl:template match=
"text()"/>
9 <xsl:template match=
"/">
10 static fix_field fix_fields[] = {
11 <xsl:apply-templates/>
16 <xsl:template match=
"fields">
17 <xsl:for-each select=
"field">
18 <xsl:sort select=
"@number" data-type=
"number"/>
20 <xsl:when test=
"count( value ) != 0">
21 <xsl:variable name=
"val_type" >
23 <xsl:when test=
"@type='INT'">0</xsl:when>
24 <xsl:when test=
"@type='STRING'">1</xsl:when>
25 <xsl:otherwise>2</xsl:otherwise>
28 {
<xsl:value-of select=
"@number"/>, -
1,
<xsl:copy-of select=
"$val_type" />,
<xsl:value-of select=
"@name"/>_val },
</xsl:when>
30 {
<xsl:value-of select=
"@number"/>, -
1,
0, NULL }, /*
<xsl:value-of select=
"@name"/> */
</xsl:otherwise>