HACK: 1. try to match RowsetProperties
[wireshark-wip.git] / fix / Values.xsl
blobdc10b4655a6cc8fdbbb7cfde4c649ac6b420cec2
1 <!--
2 Syntax: xsltproc Values.xsl FIX44.xml
3 -->
5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
6 <xsl:output method="text" encoding="UTF-8"/>
8 <xsl:template match="text()"/>
9 <xsl:template match="/">/* DO NOT EDIT
10 * This file is autogenerated
11 * Look fix/README for more information how to generate this file
13 * $Id$
17 typedef struct _fix_field {
18 int tag; /* FIX tag */
19 int hf_id;
20 int type; /* */
21 const void *table;
22 } fix_field;
24 <xsl:apply-templates/>
26 </xsl:template>
28 <!--
29 translate(@description,$uppercase,$smallcase)
30 -->
32 <xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
33 <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
35 <xsl:template match="fix/fields">
36 <xsl:for-each select="field[value]">
37 <xsl:variable name="val_type" >
38 <xsl:choose>
39 <xsl:when test="@type='STRING'"> string_string </xsl:when>
40 <xsl:when test="@type='MULTIPLESTRINGVALUE'"> string_string </xsl:when>
41 <xsl:otherwise> value_string </xsl:otherwise>
42 </xsl:choose>
43 </xsl:variable>
44 static const <xsl:copy-of select="$val_type" /> <xsl:value-of select="@name"/>_val[] = {<xsl:for-each select="value"> <xsl:choose>
45 <xsl:when test="../@type='INT'">
46 { <xsl:value-of select="@enum"/>, "<xsl:value-of select="translate(@description,'_',' ')"/>" },</xsl:when>
47 <xsl:when test="../@type='STRING'">
48 { "<xsl:value-of select="@enum"/>", "<xsl:value-of select="translate(@description,'_',' ')"/>" },</xsl:when>
49 <xsl:when test="../@type='MULTIPLESTRINGVALUE'">
50 { "<xsl:value-of select="@enum"/>", "<xsl:value-of select="translate(@description,'_',' ')"/>" },</xsl:when>
51 <xsl:otherwise>
52 { '<xsl:value-of select="@enum"/>', "<xsl:value-of select="translate(@description,'_',' ')"/>" },</xsl:otherwise>
53 </xsl:choose>
54 </xsl:for-each>
55 { 0, NULL }
58 </xsl:for-each>
59 </xsl:template>
61 <xsl:template match="fix/messages">
62 static const string_string messages_val[] = {<xsl:for-each select="message">
63 { "<xsl:value-of select="@msgtype"/>", "<xsl:value-of select="@name"/>" },</xsl:for-each>
64 { "", NULL }
66 </xsl:template>
68 </xsl:stylesheet>