forked from osmocom/wireshark
8a6daf2a1c
Add: - FIX 4.0 to 4.4 fields, auto generated with XSLT stylesheets applied on http://www.quickfixengine.org/ xml files (not included quickfixengine code is BSD but xml files have no copyright). - value_string functions for string keys, added to value_string.c. - FIX desegmentation, it doesn't work well with malformed FIX PDU. svn path=/trunk/; revision=28478
35 lines
1.1 KiB
XML
35 lines
1.1 KiB
XML
<!--
|
|
-->
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
<xsl:output method="text" encoding="UTF-8"/>
|
|
|
|
<xsl:template match="text()"/>
|
|
|
|
<xsl:template match="/">
|
|
static fix_field fix_fields[] = {
|
|
<xsl:apply-templates/>
|
|
};
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template match="fields">
|
|
<xsl:for-each select="field">
|
|
<xsl:sort select="@number" data-type="number"/>
|
|
<xsl:choose>
|
|
<xsl:when test="count( value ) != 0">
|
|
<xsl:variable name="val_type" >
|
|
<xsl:choose>
|
|
<xsl:when test="@type='INT'">0</xsl:when>
|
|
<xsl:when test="@type='STRING'">1</xsl:when>
|
|
<xsl:otherwise>2</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
{ <xsl:value-of select="@number"/>, -1, <xsl:copy-of select="$val_type" /> , <xsl:value-of select="@name"/>_val }, </xsl:when>
|
|
<xsl:otherwise>
|
|
{ <xsl:value-of select="@number"/>, -1, 0, NULL }, /* <xsl:value-of select="@name"/> */ </xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|