/
How to create FIXML message with repeating groups using XSLT
How to create FIXML message with repeating groups using XSLT
Example 1:
XML repeating group tags contain set of values. XSLT scripts will sort them into standart FIXML repeating group.
Input | XSLT script | Output |
---|---|---|
<?xml version="1.0" encoding="utf-8"?> <FIXTradeStifel> <UpdateReasonsCount>3</UpdateReasonsCount> <UpdateReasons> <anyType>Price</anyType> <anyType>Principal</anyType> <anyType>Net</anyType> </UpdateReasons> <UpdateValues> <anyType>10.00</anyType> <anyType>10000.00</anyType> <anyType>10000.00</anyType> </UpdateValues> </FIXTradeStifel>
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/"> <FIXMessage> <g6041> <xsl:attribute name="v"> <xsl:value-of select="/FIXTradeStifel/UpdateReasonsCount"/> </xsl:attribute> <xsl:for-each select="/FIXTradeStifel/UpdateReasons/anyType"> <xsl:variable name="Position" select="position()"/> <e> <f6042><xsl:value-of select="."/></f6042> <f6043><xsl:value-of select="/FIXTradeStifel/UpdateValues/anyType[$Position]"/></f6043> </e> </xsl:for-each> </g6041> </FIXMessage> </xsl:template> </xsl:stylesheet> | <?xml version="1.0" encoding="UTF-8"?> <FIXMessage> <g6041 v="3"> <e> <f6042>Price</f6042> <f6043>10.00</f6043> </e> <e> <f6042>Principal</f6042> <f6043>10000.00</f6043> </e> <e> <f6042>Net</f6042> <f6043>10000.00</f6043> </e> </g6041> </FIXMessage> |
, multiple selections available,
Related content
FIX and FIXML Dictionaries Customization Guide
FIX and FIXML Dictionaries Customization Guide
More like this
How to use custom dictionaries with FIXEdge
How to use custom dictionaries with FIXEdge
More like this
How to Use a Custom Value for Tag 8-BeginString in FIX Antenna C++
How to Use a Custom Value for Tag 8-BeginString in FIX Antenna C++
More like this
FIXEdge Java 1.10.4 and Older: Quick setup
FIXEdge Java 1.10.4 and Older: Quick setup
More like this
BL Scripting with JavaScript
BL Scripting with JavaScript
More like this
History implementation in DSL
History implementation in DSL
More like this