Skip to content

Commit

Permalink
remove any duplicates in nested groupings when generating MessageFact…
Browse files Browse the repository at this point in the history
…ory#create factory method

some vendors use the same repeating groups in different parts of a message conditional on the value of other fields e.g. different product types
  • Loading branch information
jfreedman committed Jan 31, 2018
1 parent 9b46d28 commit 5f45a39
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class MessageFactory implements quickfix.MessageFactory {

<xsl:template name="group-switch-statement">
switch (msgType) {
<xsl:for-each select="//fix/messages/message[group or component]">
<xsl:for-each-group select="//fix/messages/message[group or component]" group-by="@name">
case <xsl:value-of select="$messagePackage"/>.<xsl:value-of select="@name"/>.MSGTYPE:
switch (correspondingFieldID) {
<xsl:apply-templates mode="group-factories" select="group">
Expand All @@ -86,7 +86,7 @@ public class MessageFactory implements quickfix.MessageFactory {
</xsl:apply-templates>
}
break;
</xsl:for-each>
</xsl:for-each-group>
}
</xsl:template>

Expand Down

0 comments on commit 5f45a39

Please sign in to comment.